summaryrefslogtreecommitdiff
path: root/include/net/transp_v6.h
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2013-01-16 22:09:49 +0000
committerBitan Biswas <bbiswas@nvidia.com>2013-12-03 23:03:27 -0800
commit70c2e6332e8094fa4209d2ae4f5f73b1fe262dcc (patch)
tree655735bbf5bbe84742dde5b35e6e9d5f29b8c9e4 /include/net/transp_v6.h
parentf367dc0f333701fb9d560edb3c38277d5e11e730 (diff)
net: ipv6: Add IPv6 support to the ping socket.
[backport of net-next 6d0bfe22611602f36617bc7aa2ffa1bbb2f54c67] 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}. Bug 1412141 Change-Id: I0081b4654dd54b12c8f233e00e18943582aa2142 Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> [lorenzo@google.com: backported to 3.4] Signed-off-by: Lorenzo Colitti <lorenzo@google.com> (cherry picked from commit 1f0675844e3b63a765e5bd32bc5af051ccd951c0) Reviewed-on: http://git-master/r/336269 Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com> Tested-by: Mrutyunjay Sawant <msawant@nvidia.com> Conflicts: include/net/ipv6.h net/ipv4/af_inet.c net/ipv4/icmp.c net/ipv4/ping.c net/ipv6/Makefile net/ipv6/af_inet6.c net/ipv6/icmp.c Change-Id: I6300756942bcf23f4745400c53fdb33301e9815f Reviewed-on: http://git-master/r/337764 Reviewed-by: Om Prakash Singh <omp@nvidia.com> Tested-by: Om Prakash Singh <omp@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'include/net/transp_v6.h')
-rw-r--r--include/net/transp_v6.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h
index 938b7fd11204..eb40e71ff2ee 100644
--- a/include/net/transp_v6.h
+++ b/include/net/transp_v6.h
@@ -11,6 +11,7 @@ extern struct proto rawv6_prot;
extern struct proto udpv6_prot;
extern struct proto udplitev6_prot;
extern struct proto tcpv6_prot;
+extern struct proto pingv6_prot;
struct flowi6;
@@ -21,6 +22,8 @@ extern int ipv6_frag_init(void);
extern void ipv6_frag_exit(void);
/* transport protocols */
+extern int pingv6_init(void);
+extern void pingv6_exit(void);
extern int rawv6_init(void);
extern void rawv6_exit(void);
extern int udpv6_init(void);