Page MenuHomeFreeBSD

D14910.1793842864.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D14910.1793842864.diff

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

Mime Type
text/plain
Expires
Thu, Nov 5, 1:41 AM (4 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41452582
Default Alt Text
D14910.1793842864.diff (1 KB)

Event Timeline