summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>1998-07-20 13:21:56 +0000
committerDoug Rabson <dfr@FreeBSD.org>1998-07-20 13:21:56 +0000
commit8a261b8f7f2acf183a13a65fcf4a34b07a3e0fad (patch)
treed6aeee6eb54d3d21800666eec2683b50c9f8ab86
parent1e550e3809b2e96787623e7697b15735418cbb75 (diff)
Notes
-rw-r--r--sys/net/if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 0cdbfc1a3cc2..56b9ae8ba10a 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) {