Skip to contentSkip to conversation

Add support for sending RFC8335 PROBE messages

PATCH Andreas Roeseler 2 participants 5 messages Nov 13, 2020 5 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 20201113073230.3ecd6f0d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com

#2 lore raw
Quoted 10 lines · Jakub Kicinski
Quoted 9 lines · On Thu, 12 Nov 2020 21:02:27 -0800 Andreas Roeseler wrote:

The popular utility ping has several severe limitations such as an inability to query specific interfaces on a node and requiring bidirectional connectivity between the probing and the probed interfaces. RFC 8335 attempts to solve these limitations by creating the
new utility PROBE which is an ICMP message that makes use of the ICMP
Extension Structure outlined in RFC 4884.

Quoted 6 lines
Quoted 4 lines

This patchset adds define statments for the probe ICMP message request
and reply types for both IPv4 and IPv6. It also expands the list of supported ICMP messages to accommodate probe messages.

Did you mean to CC netdev?

Thank you for catching that. I'm new to kernel development and I'm still trying to get my bearings.

maintainer
#3 lore raw
Quoted 16 lines · On Fri, 13 Nov 2020 12:53:00 -0800 Andreas Roeseler wrote:
Quoted 15 lines · Jakub Kicinski
Quoted 13 lines · On Thu, 12 Nov 2020 21:02:27 -0800 Andreas Roeseler wrote:

The popular utility ping has several severe limitations such as an inability to query specific interfaces on a node and requiring bidirectional connectivity between the probing and the probed interfaces. RFC 8335 attempts to solve these limitations by creating the
new utility PROBE which is an ICMP message that makes use of the ICMP
Extension Structure outlined in RFC 4884.

This patchset adds define statments for the probe ICMP message request
and reply types for both IPv4 and IPv6. It also expands the list of supported ICMP messages to accommodate probe messages.

Quoted 4 lines
Quoted 1 line

Did you mean to CC netdev?

Thank you for catching that. I'm new to kernel development and I'm still trying to get my bearings.

You should repost the series, with the mailing list CCed.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Re: [PATCH 1/3] net: add support for sending probe messages

Quoted 30 lines · Andreas Roeseler

Modifying the ping_supported function to support probe messages allows
users to send probe messages while using the existing framework for sending ping messages.

---
 net/ipv4/ping.c | 4 +++-

 1 file changed, 3 insertions(+), 1 deletion(-)
net/ipv4/ping.c +0 -0
index 248856b301c4..0077ef838fef 100644
@@ -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);
 }

 /*

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

Re: [PATCH 2/3] icmp: define probe message types

Quoted 25 lines · Andreas Roeseler

Types of ICMP Extended Echo Request and ICMP Extended Echo Reply are defined in sections 2 and 3 of RFC 8335.

---
 include/uapi/linux/icmp.h | 4 ++++

 1 file changed, 4 insertions(+)
include/uapi/linux/icmp.h +0 -0
index fb169a50895e..6cabb6acc156 100644
@@ -66,6 +66,10 @@
  #define ICMP_EXC_TTL           0       /* TTL count

exceeded           */
 #define ICMP_EXC_FRAGTIME      1       /* Fragment Reass time exceeded */

include/uapi/linux/icmp.h +4 -0
+/* Codes for EXT_ECHO (Probe). */
+#define ICMP_EXT_ECHO          42
+#define ICMP_EXT_ECHOREPLY     43
+


 struct icmphdr {
   __u8         type;

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Re: [PATCH 3/3] ICMPv6: define probe message types

Quoted 29 lines · Andreas Roeseler

From: Andreas Roeseler <[email protected]>

Types of ICMPv6 Extended Echo Request and ICMPv6 Extended Echo Reply are
defined by sections 2 and 3 of RFC 8335.

---
 include/uapi/linux/icmpv6.h | 6 ++++++

 1 file changed, 6 insertions(+)
include/uapi/linux/icmpv6.h +0 -0
index c1661febc2dc..183a8b3feb92 100644
@@ -139,6 +139,12 @@ struct icmp6hdr {
  #define ICMPV6_UNK_NEXTHDR             1
  #define ICMPV6_UNK_OPTION              2

include/uapi/linux/icmpv6.h +6 -0
+/*
+ *     Codes for EXT_ECHO (Probe)
+ */
+#define ICMPV6_EXT_ECHO_REQUEST                160
+#define ICMPV6_EXT_ECHO_REPLY          161
+

 /*
  *     constants for (set|get)sockopt
  */