Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108595370
D46785.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D46785.diff
View Options
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -1471,6 +1471,7 @@
m = *mp;
ifp = m->m_pkthdr.rcvif;
*mp = NULL;
+ M_ASSERTMAPPED(m);
IGMPSTAT_INC(igps_rcv_total);
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1311,6 +1311,8 @@
u_long hash;
int hlen;
+ M_ASSERTMAPPED(m);
+
CTR3(KTR_IPMF, "ip_mforward: delete mfc orig 0x%08x group %lx ifp %p",
ntohl(ip->ip_src.s_addr), (u_long)ntohl(ip->ip_dst.s_addr), ifp);
@@ -1562,6 +1564,7 @@
vifi_t vifi;
int plen = ntohs(ip->ip_len);
+ M_ASSERTMAPPED(m);
MRW_LOCK_ASSERT();
NET_EPOCH_ASSERT();
@@ -1745,6 +1748,7 @@
int hlen = ip->ip_hl << 2;
MRW_LOCK_ASSERT();
+ M_ASSERTMAPPED(m);
/*
* Make a new reference to the packet; make sure that
diff --git a/sys/netinet/ip_options.c b/sys/netinet/ip_options.c
--- a/sys/netinet/ip_options.c
+++ b/sys/netinet/ip_options.c
@@ -514,6 +514,8 @@
*phlen = 0;
return (m); /* XXX should fail */
}
+ KASSERT((m->m_flags & M_EXTPG) == 0, ("%s: mbuf %p is unmapped",
+ __func__, m));
if (p->ipopt_dst.s_addr)
ip->ip_dst = p->ipopt_dst;
if (!M_WRITABLE(m) || M_LEADINGSPACE(m) < optlen) {
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -1073,6 +1073,7 @@
GET_TIME(tp);
#endif /* UPCALL_TIMING */
+ M_ASSERTMAPPED(m);
MRT6_DLOG(DEBUG_FORWARD, "src %s, dst %s, ifindex %d",
ip6_sprintf(ip6bufs, &ip6->ip6_src),
ip6_sprintf(ip6bufd, &ip6->ip6_dst), ifp->if_index);
@@ -1364,6 +1365,8 @@
u_int32_t iszone, idzone, oszone, odzone;
int error = 0;
+ M_ASSERTMAPPED(m);
+
/*
* Don't forward if it didn't arrive from the parent mif
* for its origin.
@@ -1527,6 +1530,8 @@
int error __unused = 0;
u_long linkmtu;
+ M_ASSERTMAPPED(m);
+
/*
* Make a new reference to the packet; make sure that
* the IPv6 header is actually copied, not just referenced,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 6:25 PM (7 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16204367
Default Alt Text
D46785.diff (2 KB)
Attached To
Mode
D46785: netinet*: Add assertions for some places that don't support M_EXTPG mbufs
Attached
Detach File
Event Timeline
Log In to Comment