inpcb: remove always true condition in in_pcblookup_local()

We are searching through the hash that has only wildcard bindings.
This was missed by fdb987bebd.

Reviewed by:		markj
Differential Revision:	https://reviews.freebsd.org/D56488
This commit is contained in:
Gleb Smirnoff
2026-04-21 09:10:49 -07:00
parent ca87c0b8e3
commit 14a47a8bed
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -2058,8 +2058,7 @@ in_pcblookup_local(struct inpcbinfo *pcbinfo, struct in_addr laddr,
if ((inp->inp_vflag & INP_IPV4) == 0) if ((inp->inp_vflag & INP_IPV4) == 0)
continue; continue;
#endif #endif
if (inp->inp_faddr.s_addr == INADDR_ANY && if (inp->inp_laddr.s_addr == laddr.s_addr &&
inp->inp_laddr.s_addr == laddr.s_addr &&
inp->inp_lport == lport && (fib == RT_ALL_FIBS || inp->inp_lport == lport && (fib == RT_ALL_FIBS ||
inp->inp_inc.inc_fibnum == fib)) { inp->inp_inc.inc_fibnum == fib)) {
/* /*
+1 -2
View File
@@ -753,8 +753,7 @@ in6_pcblookup_local(struct inpcbinfo *pcbinfo, const struct in6_addr *laddr,
/* XXX inp locking */ /* XXX inp locking */
if ((inp->inp_vflag & INP_IPV6) == 0) if ((inp->inp_vflag & INP_IPV6) == 0)
continue; continue;
if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr) && if (IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr) &&
IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr) &&
inp->inp_lport == lport && (fib == RT_ALL_FIBS || inp->inp_lport == lport && (fib == RT_ALL_FIBS ||
inp->inp_inc.inc_fibnum == fib)) { inp->inp_inc.inc_fibnum == fib)) {
/* Found. */ /* Found. */