From ed6ddd5a31acfb82ab834df0e5f5834df651be4d Mon Sep 17 00:00:00 2001 From: bz Date: Thu, 29 Jun 2006 10:49:49 +0000 Subject: Use INPLOOKUP_WILDCARD instead of just 1 more consistently. OKed by: rwatson (some weeks ago) --- sys/netinet/in_pcb.c | 2 +- sys/netinet/ip_fw2.c | 2 +- sys/netinet/tcp_input.c | 9 ++++++--- sys/netinet/tcp_reass.c | 9 ++++++--- 4 files changed, 14 insertions(+), 8 deletions(-) (limited to 'sys/netinet') diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 317be67..37386d7 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -280,7 +280,7 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr *nam, in_addr_t *laddrp, if (nam != NULL && laddr.s_addr != INADDR_ANY) return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) - wild = 1; + wild = INPLOOKUP_WILDCARD; if (nam) { sin = (struct sockaddr_in *)nam; if (nam->sa_len != sizeof (*sin)) diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 0723cbe..310fb03 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -1925,7 +1925,7 @@ check_uidgid(ipfw_insn_u32 *insn, wildcard = 0; pi = &tcbinfo; } else if (proto == IPPROTO_UDP) { - wildcard = 1; + wildcard = INPLOOKUP_WILDCARD; pi = &udbinfo; } else return 0; diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 03834b2..ddea86f 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -651,7 +651,8 @@ findpcb: next_hop->sin_port ? ntohs(next_hop->sin_port) : th->th_dport, - 1, m->m_pkthdr.rcvif); + INPLOOKUP_WILDCARD, + m->m_pkthdr.rcvif); } /* Remove the tag from the packet. We don't need it anymore. */ m_tag_delete(m, fwd_tag); @@ -662,13 +663,15 @@ findpcb: inp = in6_pcblookup_hash(&tcbinfo, &ip6->ip6_src, th->th_sport, &ip6->ip6_dst, th->th_dport, - 1, m->m_pkthdr.rcvif); + INPLOOKUP_WILDCARD, + m->m_pkthdr.rcvif); #endif } else inp = in_pcblookup_hash(&tcbinfo, ip->ip_src, th->th_sport, ip->ip_dst, th->th_dport, - 1, m->m_pkthdr.rcvif); + INPLOOKUP_WILDCARD, + m->m_pkthdr.rcvif); #ifdef IPFIREWALL_FORWARD } #endif /* IPFIREWALL_FORWARD */ diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 03834b2..ddea86f 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -651,7 +651,8 @@ findpcb: next_hop->sin_port ? ntohs(next_hop->sin_port) : th->th_dport, - 1, m->m_pkthdr.rcvif); + INPLOOKUP_WILDCARD, + m->m_pkthdr.rcvif); } /* Remove the tag from the packet. We don't need it anymore. */ m_tag_delete(m, fwd_tag); @@ -662,13 +663,15 @@ findpcb: inp = in6_pcblookup_hash(&tcbinfo, &ip6->ip6_src, th->th_sport, &ip6->ip6_dst, th->th_dport, - 1, m->m_pkthdr.rcvif); + INPLOOKUP_WILDCARD, + m->m_pkthdr.rcvif); #endif } else inp = in_pcblookup_hash(&tcbinfo, ip->ip_src, th->th_sport, ip->ip_dst, th->th_dport, - 1, m->m_pkthdr.rcvif); + INPLOOKUP_WILDCARD, + m->m_pkthdr.rcvif); #ifdef IPFIREWALL_FORWARD } #endif /* IPFIREWALL_FORWARD */ -- cgit v1.1