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:
@@ -2058,8 +2058,7 @@ in_pcblookup_local(struct inpcbinfo *pcbinfo, struct in_addr laddr,
|
||||
if ((inp->inp_vflag & INP_IPV4) == 0)
|
||||
continue;
|
||||
#endif
|
||||
if (inp->inp_faddr.s_addr == INADDR_ANY &&
|
||||
inp->inp_laddr.s_addr == laddr.s_addr &&
|
||||
if (inp->inp_laddr.s_addr == laddr.s_addr &&
|
||||
inp->inp_lport == lport && (fib == RT_ALL_FIBS ||
|
||||
inp->inp_inc.inc_fibnum == fib)) {
|
||||
/*
|
||||
|
||||
@@ -753,8 +753,7 @@ in6_pcblookup_local(struct inpcbinfo *pcbinfo, const struct in6_addr *laddr,
|
||||
/* XXX inp locking */
|
||||
if ((inp->inp_vflag & INP_IPV6) == 0)
|
||||
continue;
|
||||
if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr) &&
|
||||
IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr) &&
|
||||
if (IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr) &&
|
||||
inp->inp_lport == lport && (fib == RT_ALL_FIBS ||
|
||||
inp->inp_inc.inc_fibnum == fib)) {
|
||||
/* Found. */
|
||||
|
||||
Reference in New Issue
Block a user