Message ID | b27c48703752ed632f5de9d63606bc2d48066def.1607050389.git.andreas.a.roeseler@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | add support for RFC 8335 PROBE | expand |
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 248856b301c4..39bdcb2bfc92 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); } /*
Modify the ping_supported function to support PROBE message types. This allows tools such as the ping command in the iputils package to be modified 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(-)