mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathis Marion <mathis.marion@silabs.com>
To: Alexander Aring <aahringo@redhat.com>,
	Kuniyuki Iwashima <kuniyu@amazon.com>
Cc: alex.aring@gmail.com, davem@davemloft.net, dsahern@kernel.org,
	edumazet@google.com, jerome.pouiller@silabs.com, kuba@kernel.org,
	kylian.balan@silabs.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, pabeni@redhat.com,
	Michael Richardson <mcr@sandelman.ca>
Subject: Re: [PATCH v1 2/2] ipv6: always accept routing headers with 0 segments left
Date: Wed, 26 Jun 2024 12:10:00 +0200	[thread overview]
Message-ID: <0fc38c1b-1a28-4818-b2cc-a661f037999d@silabs.com> (raw)
In-Reply-To: <CAK-6q+gsx15xnA5bEsj3i9hUbN_cqjFDHD0-MtZiaET6tESWmw@mail.gmail.com>

On 26/06/2024 3:45 AM, Alexander Aring wrote:
> Hi,
> 
> On Tue, Jun 25, 2024 at 5:39 PM Kuniyuki Iwashima <kuniyu@amazon.com> wrote:
>>
>> From: Mathis Marion <Mathis.Marion@silabs.com>
>> Date: Mon, 24 Jun 2024 16:15:33 +0200
>>> From: Mathis Marion <mathis.marion@silabs.com>
>>>
>>> Routing headers of type 3 and 4 would be rejected even if segments left
>>> was 0, in the case that they were disabled through system configuration.
>>>
>>> RFC 8200 section 4.4 specifies:
>>>
>>>        If Segments Left is zero, the node must ignore the Routing header
>>>        and proceed to process the next header in the packet, whose type
>>>        is identified by the Next Header field in the Routing header.
>>
>> I think this part is only applied to an unrecognized Routing Type,
>> so only applied when the network stack does not know the type.
>>
>>     https://www.rfc-editor.org/rfc/rfc8200.html#section-4.4
>>
>>     If, while processing a received packet, a node encounters a Routing
>>     header with an unrecognized Routing Type value, the required behavior
>>     of the node depends on the value of the Segments Left field, as
>>     follows:
>>
>>        If Segments Left is zero, the node must ignore the Routing header
>>        and proceed to process the next header in the packet, whose type
>>        is identified by the Next Header field in the Routing header.
>>
>> That's why RPL with segment length 0 was accepted before 8610c7c6e3bd.
>>
>> But now the kernel recognizes RPL and it's intentionally disabled
>> by default with net.ipv6.conf.$DEV.rpl_seg_enabled since introduced.
>>
>> And SRv6 has been rejected since 1ababeba4a21f for the same reason.
> 
> so there might be a need to have an opt-in knob to actually tell the
> kernel ipv6 stack to recognize or not recognize a next header field
> for users wanting to bypass certain next header fields to the user
> space?
> 
> - Alex
> 

My point is that if a particular routing header support is disabled
through system configuration, it should be treated as any unrecognized
header. From my perspective, doing otherwise causes a regression every
time a new routing header is supported.


  reply	other threads:[~2024-06-26 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 14:15 [PATCH v1 0/2] " Mathis Marion
2024-06-24 14:15 ` [PATCH v1 1/2] ipv6: introduce ipv6_rthdr_rcv_last() Mathis Marion
2024-06-24 14:15 ` [PATCH v1 2/2] ipv6: always accept routing headers with 0 segments left Mathis Marion
2024-06-25 21:38   ` Kuniyuki Iwashima
2024-06-26  1:45     ` Alexander Aring
2024-06-26 10:10       ` Mathis Marion [this message]
2024-06-26 13:48         ` Alexander Aring
2024-07-16 21:27         ` Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0fc38c1b-1a28-4818-b2cc-a661f037999d@silabs.com \
    --to=mathis.marion@silabs.com \
    --cc=aahringo@redhat.com \
    --cc=alex.aring@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=jerome.pouiller@silabs.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=kylian.balan@silabs.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcr@sandelman.ca \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®