summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2011-07-08 01:09:52 +0000
committerclaudio <claudio@openbsd.org>2011-07-08 01:09:52 +0000
commit86b6cb36ced0a4712cb4230c289ab132540c29cc (patch)
tree75f205ba2f6800658037da092c2b1817f6a2f6da
parentAdd the nfs startup scripts. (diff)
downloadwireguard-openbsd-86b6cb36ced0a4712cb4230c289ab132540c29cc.tar.xz
wireguard-openbsd-86b6cb36ced0a4712cb4230c289ab132540c29cc.zip
Increase sdl_data so that more then IFNAMSIZ bytes are available.
Additionally round the sizeof(struct sockaddr_dl) to a power of 2. OK guenther@ deraadt@
-rw-r--r--sys/net/if_dl.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/net/if_dl.h b/sys/net/if_dl.h
index 005229d5cd5..11b979ec3e4 100644
--- a/sys/net/if_dl.h
+++ b/sys/net/if_dl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_dl.h,v 1.6 2003/06/02 23:28:12 millert Exp $ */
+/* $OpenBSD: if_dl.h,v 1.7 2011/07/08 01:09:52 claudio Exp $ */
/* $NetBSD: if_dl.h,v 1.8 1995/03/26 20:30:13 jtc Exp $ */
/*
@@ -63,9 +63,10 @@ struct sockaddr_dl {
u_char sdl_type; /* interface type */
u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */
u_char sdl_alen; /* link level address length */
- u_char sdl_slen; /* link layer selector length */
- char sdl_data[12]; /* minimum work area, can be larger;
- contains both if name and ll address */
+ u_char sdl_slen; /* link layer selector length, mostly 0 */
+ char sdl_data[24]; /* minimum work area, can be larger;
+ contains both if name and ll address;
+ big enough for IFNAMSIZ plus 8byte ll addr */
};
#define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen))