Message ID | d038c95149a0497e4fda40f856e1a1179065da9b.1605386600.git.andreas.a.roeseler@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | add support sending RFC8335 PROBE | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | fail | Errors and warnings before: 560 this patch: 8 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | warning | WARNING: line length of 82 exceeds 80 columns WARNING: line length of 84 exceeds 80 columns |
netdev/build_allmodconfig_warn | fail | Errors and warnings before: 560 this patch: 8 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Sat, 14 Nov 2020 12:56:11 -0800 Andreas Roeseler wrote: > 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> You need to reorder the patches so that defines are added first. Otherwise if someone lands on this patch during bisection the kernel will not build: ../net/ipv4/ping.c: In function ‘ping_supported’: ../net/ipv4/ping.c:456:39: error: ‘ICMP_EXT_ECHO’ undeclared (first use in this function); did you mean ‘ICMP_ECHO’? 456 | (family == AF_INET && type == ICMP_EXT_ECHO && code == 0) || | ^~~~~~~~~~~~~ | ICMP_ECHO ../net/ipv4/ping.c:456:39: note: each undeclared identifier is reported only once for each function it appears in ../net/ipv4/ping.c:458:40: error: ‘ICMPV6_EXT_ECHO_REQUEST’ undeclared (first use in this function); did you mean ‘ICMPV6_ECHO_REQUEST’? 458 | (family == AF_INET6 && type == ICMPV6_EXT_ECHO_REQUEST && code == 0); | ^~~~~~~~~~~~~~~~~~~~~~~ | ICMPV6_ECHO_REQUEST ../net/ipv4/ping.c:459:1: error: control reaches end of non-void function [-Werror=return-type] 459 | } | ^ cc1: some warnings being treated as errors make[3]: *** [net/ipv4/ping.o] Error 1 make[2]: *** [net/ipv4] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [__sub-make] Error 2
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); } /*
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> --- Changes since v1: - Switch to correct base tree Changes since v2: - Switch to net-next tree 67c70b5eb2bf7d0496fcb62d308dc3096bc11553 --- net/ipv4/ping.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)