Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141083510
D14910.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14910.id.diff
View Options
Index: head/sys/net/if.c
===================================================================
--- head/sys/net/if.c
+++ head/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>
Index: head/sys/netinet6/in6.c
===================================================================
--- head/sys/netinet6/in6.c
+++ head/sys/netinet6/in6.c
@@ -112,6 +112,14 @@
#include <netinet6/in6_fib.h>
#include <netinet6/in6_pcb.h>
+/*
+ * struct in6_ifreq and struct ifreq must be type punnable for common members
+ * of ifr_ifru to allow accessors to be shared.
+ */
+_Static_assert(offsetof(struct in6_ifreq, ifr_ifru) ==
+ offsetof(struct ifreq, ifr_ifru),
+ "struct in6_ifreq and struct ifreq are not type punnable");
+
VNET_DECLARE(int, icmp6_nodeinfo_oldmcprefix);
#define V_icmp6_nodeinfo_oldmcprefix VNET(icmp6_nodeinfo_oldmcprefix)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 1, 3:53 PM (3 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27436212
Default Alt Text
D14910.id.diff (1 KB)
Attached To
Mode
D14910: Document and enforce assumptions about struct (in6_)ifreq.
Attached
Detach File
Event Timeline
Log In to Comment