440598dd9e
When a user creates a TCP socket and tries to connect to the socket without explicitly binding the socket to a local address, the connect call implicitly chooses an appropriate local port. When evaluating candidate local ports, the algorithm checks for conflicts with existing ports by doing a lookup in the connection hash table. In this circumstance, both the IPv4 and IPv6 code look for exact matches in the hash table. However, the IPv4 code goes a step further and checks whether the proposed 4-tuple will match wildcard (e.g. TCP "listen") entries. The IPv6 code has no such check. The missing wildcard check can cause problems when connecting to a local server. It is possible that the algorithm will choose the same value for the local port as the foreign port uses. This results in a connection with identical source and destination addresses and ports. Changing the IPv6 code to align with the IPv4 code's behavior fixes this problem. Reviewed by: tuexen Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27164 |
||
---|---|---|
.. | ||
dest6.c | ||
frag6.c | ||
icmp6.c | ||
icmp6.h | ||
in6_cksum.c | ||
in6_fib.c | ||
in6_fib.h | ||
in6_gif.c | ||
in6_ifattach.c | ||
in6_ifattach.h | ||
in6_jail.c | ||
in6_mcast.c | ||
in6_pcb.c | ||
in6_pcb.h | ||
in6_pcbgroup.c | ||
in6_proto.c | ||
in6_rmx.c | ||
in6_rss.c | ||
in6_rss.h | ||
in6_src.c | ||
in6_var.h | ||
in6.c | ||
in6.h | ||
ip6_ecn.h | ||
ip6_fastfwd.c | ||
ip6_forward.c | ||
ip6_gre.c | ||
ip6_id.c | ||
ip6_input.c | ||
ip6_mroute.c | ||
ip6_mroute.h | ||
ip6_output.c | ||
ip6_var.h | ||
ip6.h | ||
ip6protosw.h | ||
ip_fw_nat64.h | ||
ip_fw_nptv6.h | ||
mld6_var.h | ||
mld6.c | ||
mld6.h | ||
nd6_nbr.c | ||
nd6_rtr.c | ||
nd6.c | ||
nd6.h | ||
pim6_var.h | ||
pim6.h | ||
raw_ip6.c | ||
raw_ip6.h | ||
route6.c | ||
scope6_var.h | ||
scope6.c | ||
sctp6_usrreq.c | ||
sctp6_var.h | ||
send.c | ||
send.h | ||
tcp6_var.h | ||
udp6_usrreq.c | ||
udp6_var.h |