-
- Downloads
net: ipv6: Add IPv6 support to the ping socket.
This adds the ability to send ICMPv6 echo requests without a raw socket. The equivalent ability for ICMPv4 was added in 2011. Instead of having separate code paths for IPv4 and IPv6, make most of the code in net/ipv4/ping.c dual-stack and only add a few IPv6-specific bits (like the protocol definition) to a new net/ipv6/ping.c. Hopefully this will reduce divergence and/or duplication of bugs in the future. Caveats: - Setting options via ancillary data (e.g., using IPV6_PKTINFO to specify the outgoing interface) is not yet supported. - There are no separate security settings for IPv4 and IPv6; everything is controlled by /proc/net/ipv4/ping_group_range. - The proc interface does not yet display IPv6 ping sockets properly. Tested with a patched copy of ping6 and using raw socket calls. Compiles and works with all of CONFIG_IPV6={n,m,y}. Signed-off-by:Lorenzo Colitti <lorenzo@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/ipv6.h 6 additions, 0 deletionsinclude/net/ipv6.h
- include/net/ping.h 46 additions, 3 deletionsinclude/net/ping.h
- include/net/transp_v6.h 3 additions, 0 deletionsinclude/net/transp_v6.h
- net/ipv4/icmp.c 3 additions, 2 deletionsnet/ipv4/icmp.c
- net/ipv4/ping.c 397 additions, 160 deletionsnet/ipv4/ping.c
- net/ipv6/Makefile 1 addition, 1 deletionnet/ipv6/Makefile
- net/ipv6/af_inet6.c 12 additions, 0 deletionsnet/ipv6/af_inet6.c
- net/ipv6/icmp.c 14 additions, 5 deletionsnet/ipv6/icmp.c
- net/ipv6/ping.c 216 additions, 0 deletionsnet/ipv6/ping.c
Loading
Please register or sign in to comment