diff options
author | dfr <dfr@FreeBSD.org> | 1998-07-20 13:21:56 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-07-20 13:21:56 +0000 |
commit | fc4d618c2d94df027354a981a312a2bca44c7131 (patch) | |
tree | 7001bf29f0cf980de468ff4a205d647b65a12fc7 /sys/net | |
parent | 6bdff03bd13d386bfcd0b0e7fff6d30b640d8f64 (diff) | |
download | FreeBSD-src-fc4d618c2d94df027354a981a312a2bca44c7131.zip FreeBSD-src-fc4d618c2d94df027354a981a312a2bca44c7131.tar.gz |
Make sure the link level sockaddr size is rounded up correctly on alpha.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 0cdbfc1..56b9ae8 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.3 (Berkeley) 1/4/94 - * $Id: if.c,v 1.59 1998/06/07 17:12:02 dfr Exp $ + * $Id: if.c,v 1.60 1998/06/08 20:33:29 julian Exp $ */ #include "opt_compat.h" @@ -148,9 +148,9 @@ if_attach(ifp) masklen = _offsetof(struct sockaddr_dl, sdl_data[0]) + namelen; socksize = masklen + ifp->if_addrlen; #define ROUNDUP(a) (1 + (((a) - 1) | (sizeof(long) - 1))) - socksize = ROUNDUP(socksize); if (socksize < sizeof(*sdl)) socksize = sizeof(*sdl); + socksize = ROUNDUP(socksize); ifasize = sizeof(*ifa) + 2 * socksize; ifa = (struct ifaddr *)malloc(ifasize, M_IFADDR, M_WAITOK); if (ifa) { |