Page MenuHomeFreeBSD

D38361.diff
No OneTemporary

D38361.diff

diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -2242,6 +2242,10 @@
KASSERT((lookupflags & ~(INPLOOKUP_WILDCARD)) == 0,
("%s: invalid lookup flags %d", __func__, lookupflags));
+ KASSERT(faddr.s_addr != INADDR_ANY,
+ ("%s: invalid foreign address", __func__));
+ KASSERT(laddr.s_addr != INADDR_ANY,
+ ("%s: invalid local address", __func__));
INP_HASH_LOCK_ASSERT(pcbinfo);
/*
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -980,6 +980,10 @@
KASSERT((lookupflags & ~(INPLOOKUP_WILDCARD)) == 0,
("%s: invalid lookup flags %d", __func__, lookupflags));
+ KASSERT(!IN6_IS_ADDR_UNSPECIFIED(faddr),
+ ("%s: invalid foreign address", __func__));
+ KASSERT(!IN6_IS_ADDR_UNSPECIFIED(laddr),
+ ("%s: invalid local address", __func__));
INP_HASH_LOCK_ASSERT(pcbinfo);

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 3:16 PM (7 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16090288
Default Alt Text
D38361.diff (948 B)

Event Timeline