From: claudio Date: Mon, 28 Jul 2008 19:38:07 +0000 (+0000) Subject: Align the route message length to the next natural boundary via ALIGN() to X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bb7f092270f3f2320585e16af22024d3cc8f874c;p=openbsd Align the route message length to the next natural boundary via ALIGN() to ensure that the next message is nicely aligned as well. Some archs (sparc, m88k)have strict alignement issues since the inclusion of 64bit counters in the messages because those values could end up on non aligned addresses. Found and fix tested by miod@, OK deraadt@ --- diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 6f18a5bece9..19bb0ef661a 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.73 2008/06/13 21:49:57 claudio Exp $ */ +/* $OpenBSD: rtsock.c,v 1.74 2008/07/28 19:38:07 claudio Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -713,6 +713,8 @@ again: } len += dlen; } + /* align message length to the next natural boundary */ + len = ALIGN(len); if (cp == 0 && w != NULL && !second_time) { struct walkarg *rw = w;