aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2018-03-30 21:38:53 +0000
committerBrooks Davis <brooks@FreeBSD.org>2018-03-30 21:38:53 +0000
commit8708f1bdafe8c9e062cf5618916a2df4e3e8ec01 (patch)
treee49e1ecf19329d505777d2f4b9cf0599ff1b74c0 /sys/net/if.c
parentedde7c6e59a399b5aad5f0726f269cc3fff453bb (diff)
downloadsrc-8708f1bdafe8c9e062cf5618916a2df4e3e8ec01.tar.gz
src-8708f1bdafe8c9e062cf5618916a2df4e3e8ec01.zip
Notes
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index ddd54a97349c..60a71da6de54 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -97,6 +97,13 @@
#include <security/mac/mac_framework.h>
+/*
+ * Consumers of struct ifreq such as tcpdump assume no pad between ifr_name
+ * and ifr_ifru when it is used in SIOCGIFCONF.
+ */
+_Static_assert(sizeof(((struct ifreq *)0)->ifr_name) ==
+ offsetof(struct ifreq, ifr_ifru), "gap between ifr_name and ifr_ifru");
+
#ifdef COMPAT_FREEBSD32
#include <sys/mount.h>
#include <compat/freebsd32/freebsd32.h>