linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE
@ 2020-11-18  0:46 Andreas Roeseler
  2020-11-18  0:47 ` [PATCH v4 net-next 1/3] icmp: define PROBE message types Andreas Roeseler
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Andreas Roeseler @ 2020-11-18  0:46 UTC (permalink / raw)
  To: davem; +Cc: kuznet, yoshfuji, kuba, netdev, linux-kernel

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

This patchset adds definitions for the ICMP Extended Echo Request and
Reply (PROBE) types for both IPv4 and IPv6. It also expands the list of
supported ICMP messages to accommodate PROBEs.

Changes since v1:
 - Switch to correct base tree

Changes since v2:
 - Switch to net-next tree 67c70b5eb2bf7d0496fcb62d308dc3096bc11553

Changes since v3:
 - Reorder patches to add defines first

Andreas Roeseler (3):
  icmp: define PROBE message types
  ICMPv6: define PROBE message types
  net: add support for sending RFC8335 PROBE

 include/uapi/linux/icmp.h   | 3 +++
 include/uapi/linux/icmpv6.h | 6 ++++++
 net/ipv4/ping.c             | 4 +++-
 3 files changed, 12 insertions(+), 1 deletion(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v4 net-next 1/3] icmp: define PROBE message types
  2020-11-18  0:46 [PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE Andreas Roeseler
@ 2020-11-18  0:47 ` Andreas Roeseler
  2020-11-18  0:47 ` [PATCH v4 net-next 2/3] ICMPv6: " Andreas Roeseler
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Andreas Roeseler @ 2020-11-18  0:47 UTC (permalink / raw)
  To: davem; +Cc: kuznet, yoshfuji, kuba, netdev, linux-kernel

The types of ICMP Extended Echo Request and ICMP Extended Echo Reply are
defined in sections 2 and 3 of RFC8335.

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

Changes since v3:
 - Reorder patches to add defines first
---
 include/uapi/linux/icmp.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/uapi/linux/icmp.h b/include/uapi/linux/icmp.h
index fb169a50895e..1a84450f667f 100644
--- a/include/uapi/linux/icmp.h
+++ b/include/uapi/linux/icmp.h
@@ -66,6 +66,9 @@
 #define ICMP_EXC_TTL		0	/* TTL count exceeded		*/
 #define ICMP_EXC_FRAGTIME	1	/* Fragment Reass time exceeded	*/
 
+/* Codes for EXT_ECHO (Probe) */
+#define ICMP_EXT_ECHO		42
+#define ICMP_EXT_ECHOREPLY	43
 
 struct icmphdr {
   __u8		type;
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v4 net-next 2/3] ICMPv6: define PROBE message types
  2020-11-18  0:46 [PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE Andreas Roeseler
  2020-11-18  0:47 ` [PATCH v4 net-next 1/3] icmp: define PROBE message types Andreas Roeseler
@ 2020-11-18  0:47 ` Andreas Roeseler
  2020-11-18  0:47 ` [PATCH v4 net-next 3/3] net: add support for sending RFC8335 PROBE Andreas Roeseler
  2020-11-20  3:51 ` [PATCH v4 net-next 0/3] " David Ahern
  3 siblings, 0 replies; 8+ messages in thread
From: Andreas Roeseler @ 2020-11-18  0:47 UTC (permalink / raw)
  To: davem; +Cc: kuznet, yoshfuji, kuba, netdev, linux-kernel

The types of ICMPV6 Extended Echo Request and ICMPV6 Extended Echo Reply
are defined in sections 2 and 3 of RFC8335.

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

Changes since v3:
 - Reorder patches to add defines first
---
 include/uapi/linux/icmpv6.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/linux/icmpv6.h b/include/uapi/linux/icmpv6.h
index 0564fd7ccde4..54dbafdedca1 100644
--- a/include/uapi/linux/icmpv6.h
+++ b/include/uapi/linux/icmpv6.h
@@ -140,6 +140,12 @@ struct icmp6hdr {
 #define ICMPV6_UNK_OPTION		2
 #define ICMPV6_HDR_INCOMP		3
 
+/*
+ *	Codes for EXT_ECHO (Probe)
+ */
+#define ICMPV6_EXT_ECHO_REQUEST		160
+#define ICMPV6_EXT_ECHO_REPLY		161
+
 /*
  *	constants for (set|get)sockopt
  */
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v4 net-next 3/3] net: add support for sending RFC8335 PROBE
  2020-11-18  0:46 [PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE Andreas Roeseler
  2020-11-18  0:47 ` [PATCH v4 net-next 1/3] icmp: define PROBE message types Andreas Roeseler
  2020-11-18  0:47 ` [PATCH v4 net-next 2/3] ICMPv6: " Andreas Roeseler
@ 2020-11-18  0:47 ` Andreas Roeseler
  2020-11-20  3:51 ` [PATCH v4 net-next 0/3] " David Ahern
  3 siblings, 0 replies; 8+ messages in thread
From: Andreas Roeseler @ 2020-11-18  0:47 UTC (permalink / raw)
  To: davem; +Cc: kuznet, yoshfuji, kuba, netdev, linux-kernel

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

Changes since v3:
 - Reorder patches add defines first 
---
 net/ipv4/ping.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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);
 }
 
 /*
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE
  2020-11-18  0:46 [PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE Andreas Roeseler
                   ` (2 preceding siblings ...)
  2020-11-18  0:47 ` [PATCH v4 net-next 3/3] net: add support for sending RFC8335 PROBE Andreas Roeseler
@ 2020-11-20  3:51 ` David Ahern
  2020-11-20  4:01   ` David Ahern
  3 siblings, 1 reply; 8+ messages in thread
From: David Ahern @ 2020-11-20  3:51 UTC (permalink / raw)
  To: Andreas Roeseler, davem; +Cc: kuznet, yoshfuji, kuba, netdev, linux-kernel

On 11/17/20 5:46 PM, Andreas Roeseler wrote:
> The popular utility ping has several severe limitations such as the
> inability to query specific  interfaces on a node and requiring
> bidirectional connectivity between the probing and the probed
> interfaces. RFC8335 attempts to solve these limitations by creating the
> new utility PROBE which is a specialized ICMP message that makes use of
> the ICMP Extension Structure outlined in RFC4884.
> 
> This patchset adds definitions for the ICMP Extended Echo Request and
> Reply (PROBE) types for both IPv4 and IPv6. It also expands the list of
> supported ICMP messages to accommodate PROBEs.
> 

You are updating the send, but what about the response side?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE
  2020-11-20  3:51 ` [PATCH v4 net-next 0/3] " David Ahern
@ 2020-11-20  4:01   ` David Ahern
  2020-11-20 17:27     ` Andreas Roeseler
  0 siblings, 1 reply; 8+ messages in thread
From: David Ahern @ 2020-11-20  4:01 UTC (permalink / raw)
  To: Andreas Roeseler, davem; +Cc: kuznet, yoshfuji, kuba, netdev, linux-kernel

On 11/19/20 8:51 PM, David Ahern wrote:
> On 11/17/20 5:46 PM, Andreas Roeseler wrote:
>> The popular utility ping has several severe limitations such as the
>> inability to query specific  interfaces on a node and requiring
>> bidirectional connectivity between the probing and the probed
>> interfaces. RFC8335 attempts to solve these limitations by creating the
>> new utility PROBE which is a specialized ICMP message that makes use of
>> the ICMP Extension Structure outlined in RFC4884.
>>
>> This patchset adds definitions for the ICMP Extended Echo Request and
>> Reply (PROBE) types for both IPv4 and IPv6. It also expands the list of
>> supported ICMP messages to accommodate PROBEs.
>>
> 
> You are updating the send, but what about the response side?
> 

you also are not setting 'ICMP Extension Structure'. From:
https://tools.ietf.org/html/rfc8335

   o  ICMP Extension Structure: The ICMP Extension Structure identifies
      the probed interface.

   Section 7 of [RFC4884] defines the ICMP Extension Structure.  As per
   RFC 4884, the Extension Structure contains exactly one Extension
   Header followed by one or more objects.  When applied to the ICMP
   Extended Echo Request message, the ICMP Extension Structure MUST
   contain exactly one instance of the Interface Identification Object
   (see Section 2.1).

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE
  2020-11-20  4:01   ` David Ahern
@ 2020-11-20 17:27     ` Andreas Roeseler
  2020-11-20 20:22       ` David Ahern
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Roeseler @ 2020-11-20 17:27 UTC (permalink / raw)
  To: David Ahern, davem; +Cc: kuznet, yoshfuji, kuba, netdev, linux-kernel

On Thu, 2020-11-19 at 21:01 -0700, David Ahern wrote:
> On 11/19/20 8:51 PM, David Ahern wrote:
> > On 11/17/20 5:46 PM, Andreas Roeseler wrote:
> > > The popular utility ping has several severe limitations such as
> > > the
> > > inability to query specific  interfaces on a node and requiring
> > > bidirectional connectivity between the probing and the probed
> > > interfaces. RFC8335 attempts to solve these limitations by
> > > creating the
> > > new utility PROBE which is a specialized ICMP message that makes
> > > use of
> > > the ICMP Extension Structure outlined in RFC4884.
> > > 
> > > This patchset adds definitions for the ICMP Extended Echo Request
> > > and
> > > Reply (PROBE) types for both IPv4 and IPv6. It also expands the
> > > list of
> > > supported ICMP messages to accommodate PROBEs.
> > > 
> > 
> > You are updating the send, but what about the response side?
> > 
> 
> you also are not setting 'ICMP Extension Structure'. From:
> https://tools.ietf.org/html/rfc8335
> 
>    o  ICMP Extension Structure: The ICMP Extension Structure
> identifies
>       the probed interface.
> 
>    Section 7 of [RFC4884] defines the ICMP Extension Structure.  As
> per
>    RFC 4884, the Extension Structure contains exactly one Extension
>    Header followed by one or more objects.  When applied to the ICMP
>    Extended Echo Request message, the ICMP Extension Structure MUST
>    contain exactly one instance of the Interface Identification
> Object
>    (see Section 2.1).

I am currently finishing testing and polishing the response side and
hope to be sendding out v1 of the patch in the upcoming few weeks.

As for the 'ICMP Extension Structure', I have been working with the
iputils package to add a command to send PROBE messages, and the
changes included in this patchset are all that are necessary to be able
to send PROBEs using the existing ping framework.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE
  2020-11-20 17:27     ` Andreas Roeseler
@ 2020-11-20 20:22       ` David Ahern
  0 siblings, 0 replies; 8+ messages in thread
From: David Ahern @ 2020-11-20 20:22 UTC (permalink / raw)
  To: Andreas Roeseler, davem; +Cc: kuznet, yoshfuji, kuba, netdev, linux-kernel

On 11/20/20 10:27 AM, Andreas Roeseler wrote:
> On Thu, 2020-11-19 at 21:01 -0700, David Ahern wrote:
>> On 11/19/20 8:51 PM, David Ahern wrote:
>>> On 11/17/20 5:46 PM, Andreas Roeseler wrote:
>>>> The popular utility ping has several severe limitations such as
>>>> the
>>>> inability to query specific  interfaces on a node and requiring
>>>> bidirectional connectivity between the probing and the probed
>>>> interfaces. RFC8335 attempts to solve these limitations by
>>>> creating the
>>>> new utility PROBE which is a specialized ICMP message that makes
>>>> use of
>>>> the ICMP Extension Structure outlined in RFC4884.
>>>>
>>>> This patchset adds definitions for the ICMP Extended Echo Request
>>>> and
>>>> Reply (PROBE) types for both IPv4 and IPv6. It also expands the
>>>> list of
>>>> supported ICMP messages to accommodate PROBEs.
>>>>
>>>
>>> You are updating the send, but what about the response side?
>>>
>>
>> you also are not setting 'ICMP Extension Structure'. From:
>> https://tools.ietf.org/html/rfc8335
>>
>>    o  ICMP Extension Structure: The ICMP Extension Structure
>> identifies
>>       the probed interface.
>>
>>    Section 7 of [RFC4884] defines the ICMP Extension Structure.  As
>> per
>>    RFC 4884, the Extension Structure contains exactly one Extension
>>    Header followed by one or more objects.  When applied to the ICMP
>>    Extended Echo Request message, the ICMP Extension Structure MUST
>>    contain exactly one instance of the Interface Identification
>> Object
>>    (see Section 2.1).
> 
> I am currently finishing testing and polishing the response side and
> hope to be sendding out v1 of the patch in the upcoming few weeks.

send the response side with the request side -- 1 set of patches for the
entire feature.

> 
> As for the 'ICMP Extension Structure', I have been working with the
> iputils package to add a command to send PROBE messages, and the
> changes included in this patchset are all that are necessary to be able
> to send PROBEs using the existing ping framework.
> 

right.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-11-20 20:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18  0:46 [PATCH v4 net-next 0/3] add support for sending RFC8335 PROBE Andreas Roeseler
2020-11-18  0:47 ` [PATCH v4 net-next 1/3] icmp: define PROBE message types Andreas Roeseler
2020-11-18  0:47 ` [PATCH v4 net-next 2/3] ICMPv6: " Andreas Roeseler
2020-11-18  0:47 ` [PATCH v4 net-next 3/3] net: add support for sending RFC8335 PROBE Andreas Roeseler
2020-11-20  3:51 ` [PATCH v4 net-next 0/3] " David Ahern
2020-11-20  4:01   ` David Ahern
2020-11-20 17:27     ` Andreas Roeseler
2020-11-20 20:22       ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).