1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-28 16:43:09 +00:00

Use INPLOOKUP_WILDCARD instead of just 1 more consistently.

OKed by: rwatson (some weeks ago)
This commit is contained in:
Bjoern A. Zeeb 2006-06-29 10:49:49 +00:00
parent d29a8ce69b
commit 421d8aa603
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=160024
5 changed files with 15 additions and 9 deletions

View File

@ -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))

View File

@ -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;

View File

@ -651,7 +651,8 @@ tcp_input(m, off0)
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 @@ tcp_input(m, off0)
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 */

View File

@ -651,7 +651,8 @@ tcp_input(m, off0)
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 @@ tcp_input(m, off0)
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 */

View File

@ -138,7 +138,7 @@ in6_pcbbind(inp, nam, cred)
if (inp->inp_lport || !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr))
return (EINVAL);
if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0)
wild = 1;
wild = INPLOOKUP_WILDCARD;
if (nam) {
int error;