mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
inpcb: Assert against wildcard addrs in in_pcblookup_hash_locked()
No functional change intended. Reviewed by: glebius MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D38361
This commit is contained in:
parent
675e2618ae
commit
b0ccf53f24
|
@ -2242,6 +2242,10 @@ in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr,
|
|||
|
||||
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);
|
||||
|
||||
/*
|
||||
|
|
|
@ -980,6 +980,10 @@ in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in6_addr *faddr,
|
|||
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue