|
Cherry-picked from Linux 524354b4d086a4f013343d727eaccb7b4c39eb25
* pfinet/glue-include/linux/ipv6.h: Include linux/config.h>
(__ipv6_only_sock, ipv6_only_sock): New macros
* pfinet/linux-src/include/linux/ipv6.h: Likewise.
* pfinet/linux-src/include/linux/in6.h (IPV6_V6ONLY): New macro.
* pfinet/linux-src/include/linux/sysctl.h (NET_IPV6_BINDV6ONLY): New macro.
* pfinet/linux-src/include/net/ipv6.h (sysctl_ipv6_bindv6only): Declare
variable.
* pfinet/linux-src/include/net/sock.h (ipv6_pinfo): Add ipv6only field.
* pfinet/linux-src/net/ipv4/tcp_ipv4.c: Include linux/ipv6.h.
(tcp_v4_get_port, tcp_v4_lookup_listener): Test for ipv6_only_sock.
* pfinet/linux-src/net/ipv4/udp.c: Include linux/ipv6.h.
(udp_v4_get_port, udp_v4_lookup_longway, udp_v4_mcast_next): Test for
ipv6_only_sock.
* pfinet/linux-src/net/ipv6/af_inet6.c (sysctl_ipv6_bindv6only): New
variable.
(inet6_create): Initialize ipv6only field to sysctl_ipv6_bindv6only.
* pfinet/linux-src/net/ipv6/ipv6_sockglue.c (ipv6_setsockopt): Test for
ipv6_only_sock.
(ipv6_setsockopt, ipv6_getsockopt): Support IPV6_V6ONLY case.
* pfinet/linux-src/net/ipv6/tcp_ipv6.c (ipv6_rcv_saddr_equal): New inline
function.
(tcp_v6_get_port): Replace old tests with ipv6_rcv_saddr_equal.
(tcp_v6_connect): Test for __ipv6_only_sock.
* pfinet/linux-src/net/ipv6/udp_ipv6.c (udv6_rcv_saddr_equal): New inline
function.
(udp_v6_get_port): Replace old tests with udv6_rcv_saddr_equal.
(udpv6_connect, udpv6_sendmsg): Test for __ipv6_only_sock.
|