diff mbox series

[net-next,1/3] net: add support for sending probe messages

Message ID 6e867d127ad9c6b40f2de312b22fd4ee331331a6.1605303918.git.andreas.a.roeseler@gmail.com
State Superseded
Headers show
Series Add support for sending RFC8335 PROBE | expand

Commit Message

Andreas Roeseler Nov. 13, 2020, 9:59 p.m. UTC
Modifying the ping_supported function to support probe message types allows the
user to send probe requests through the existing framework for
sending ping requests.

Signed-off-by: Andreas Roeseler <andreas.a.roeseler@gmail.com>
---
 net/ipv4/ping.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 248856b301c4..0077ef838fef 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -453,7 +453,9 @@  EXPORT_SYMBOL_GPL(ping_bind);
 static inline int ping_supported(int family, int type, int code)
 {
 	return (family == AF_INET && type == ICMP_ECHO && code == 0) ||
-	       (family == AF_INET6 && type == ICMPV6_ECHO_REQUEST && code == 0);
+	       (family == AF_INET && type == ICMP_EXT_ECHO  && code == 0) ||
+	       (family == AF_INET6 && type == ICMPV6_ECHO_REQUEST && code == 0) ||
+	       (family == AF_INET6 && type == ICMPV6_EXT_ECHO_REQUEST && code == 0);
 }
 
 /*