Remove redundant checks for a NULL lbgroup table.

No functional change intended.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17108
This commit is contained in:
Mark Johnston 2018-11-01 15:52:49 +00:00
parent 79ee680b65
commit d9ff5789be
2 changed files with 4 additions and 14 deletions

View File

@ -322,9 +322,6 @@ in_pcbinslbgrouphash(struct inpcb *inp)
INP_WLOCK_ASSERT(inp);
INP_HASH_WLOCK_ASSERT(pcbinfo);
if (pcbinfo->ipi_lbgrouphashbase == NULL)
return (0);
/*
* Don't allow jailed socket to join local group.
*/
@ -399,9 +396,6 @@ in_pcbremlbgrouphash(struct inpcb *inp)
INP_WLOCK_ASSERT(inp);
INP_HASH_WLOCK_ASSERT(pcbinfo);
if (pcbinfo->ipi_lbgrouphashbase == NULL)
return;
hdr = &pcbinfo->ipi_lbgrouphashbase[
INP_PCBLBGROUP_PORTHASH(inp->inp_lport,
pcbinfo->ipi_lbgrouphashmask)];
@ -2276,13 +2270,11 @@ in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr,
/*
* Then look in lb group (for wildcard match).
*/
if (pcbinfo->ipi_lbgrouphashbase != NULL &&
(lookupflags & INPLOOKUP_WILDCARD)) {
if ((lookupflags & INPLOOKUP_WILDCARD) != 0) {
inp = in_pcblookup_lbgroup(pcbinfo, &laddr, lport, &faddr,
fport, lookupflags);
if (inp != NULL) {
if (inp != NULL)
return (inp);
}
}
/*

View File

@ -1161,13 +1161,11 @@ in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in6_addr *faddr,
/*
* Then look in lb group (for wildcard match).
*/
if (pcbinfo->ipi_lbgrouphashbase != NULL &&
(lookupflags & INPLOOKUP_WILDCARD)) {
if ((lookupflags & INPLOOKUP_WILDCARD) != 0) {
inp = in6_pcblookup_lbgroup(pcbinfo, laddr, lport, faddr,
fport, lookupflags);
if (inp != NULL) {
if (inp != NULL)
return (inp);
}
}
/*