Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 Compliance RFC4861: Prefix Information Option Processing, On-link Flag (Hosts Only) [v6LC.2.1.3] #28435

Closed
LiveFreeAndRoam opened this issue Jul 17, 2023 · 4 comments · Fixed by #31177 or #32240
Labels
bug 🐛 Programming errors, that need preferential fixing ndisc/ra network
Milestone

Comments

@LiveFreeAndRoam
Copy link
Contributor

systemd version the issue has been seen with

250

Used distribution

Embedded Linux - Debian-based

Linux kernel version used

5.15.71-rt51+gc36e774d0d9a

CPU architectures issue was seen on

aarch64

Component

systemd-networkd

Expected behaviour you didn't see

Networkd MUST NOT interpret the Prefix Information OnLink (L) flag when it is clear.

RFC4861 - Extract from Page 54-55:

   Prefix Information options that have the "on-link" (L) flag set
   indicate a prefix identifying a range of addresses that should be
   considered on-link.  Note, however, that a Prefix Information option
   with the on-link flag set to zero conveys no information concerning
   on-link determination and MUST NOT be interpreted to mean that
   addresses covered by the prefix are off-link.  The only way to cancel
   a previous on-link indication is to advertise that prefix with the
   L-bit set and the Lifetime set to zero.

Unexpected behaviour you saw

Networkd interpreted the Prefix Information with a cleared OnLink (L) flag, when it MUST ignore i t.

Steps to reproduce the problem

The attached file contains a replay folder. You can replay those protocol exchanges using:

$ sudo /usr/local/bin/tcpreplay -o -i ens224 v6LC_2_1_03.pcapng 

After each protocol exchange, you can examine the routing table.

Packet 1: Router LL: RA Prefix: 2001:2:1000 (On-Link=1)

$ ip -6 r get 2001:2:0:1000::
2001:2:0:1000:: dev eno0 proto ra src 2001:2:0:1000:9640:c9ff:fed6:dcd7 metric 10 pref medium

Packet 2: Router LL: RA Prefix: 2001:2:1000 (On-Link=0)

$ ip -6 r get 2001:2:0:1000::
2001:2:0:1000:: via fe80::200:10ff:fe10:1060 dev eno0 proto ra src 2001:2:0:1000:9640:c9ff:fed6:dcd7 metric 10 pref medium

According to RFC 4861, section 6.3.4, Packet 2 ought not have affected the routing table, but clearly it has.

2_1_3 - Prefix Information Option Processing, On-link Flag.zip

Additional program output to the terminal or log subsystem illustrating the issue

No response

@yuwata
Copy link
Member

yuwata commented Feb 2, 2024

Fix is waiting in #31177.

yuwata added a commit to yuwata/systemd that referenced this issue Feb 2, 2024
yuwata added a commit to yuwata/systemd that referenced this issue Feb 7, 2024
yuwata added a commit to yuwata/systemd that referenced this issue Feb 7, 2024
yuwata added a commit to yuwata/systemd that referenced this issue Feb 8, 2024
yuwata added a commit to yuwata/systemd that referenced this issue Feb 8, 2024
@LiveFreeAndRoam
Copy link
Contributor Author

I'll be able to validate this on Tuesday, next week.

@LiveFreeAndRoam
Copy link
Contributor Author

I retested this on 253.5 and also from ToT. I see it passing with both builds. So, this one was fixed sometime between 250 and 253.5. This one is verified.

@LiveFreeAndRoam LiveFreeAndRoam changed the title IPv6 Compliance RFC4861: Prefix Information Option Processing, On-link Flag (Hosts Only) IPv6 Compliance RFC4861: Prefix Information Option Processing, On-link Flag (Hosts Only) [v6LC2.1.3] Mar 19, 2024
@LiveFreeAndRoam LiveFreeAndRoam changed the title IPv6 Compliance RFC4861: Prefix Information Option Processing, On-link Flag (Hosts Only) [v6LC2.1.3] IPv6 Compliance RFC4861: Prefix Information Option Processing, On-link Flag (Hosts Only) [v6LC.2.1.3] Mar 19, 2024
ayhamthemayhem pushed a commit to neighbourhoodie/nh-systemd that referenced this issue Mar 25, 2024
@yuwata yuwata reopened this Apr 11, 2024
@yuwata
Copy link
Member

yuwata commented Apr 11, 2024

It seems I did something wrong in #31177...

yuwata added a commit to yuwata/systemd that referenced this issue Apr 11, 2024
This effectively reverts commit 155d7a2.

From RFC 4861 section 6.3.4:
> Note, however, that a Prefix Information option with the on-link flag
> set to zero conveys no information concerning on-link determination and
> MUST NOT be interpreted to mean that addresses covered by the prefix
> are off-link.

So, we should not drop previously configured routes when receieved a RA
with Prefix Information option without on-link flag.

Closes systemd#28435.
@yuwata yuwata added this to the v256 milestone Apr 11, 2024
yuwata added a commit to yuwata/systemd that referenced this issue Apr 11, 2024
This effectively reverts commit 155d7a2.

From RFC 4861 section 6.3.4:
> Note, however, that a Prefix Information option with the on-link flag
> set to zero conveys no information concerning on-link determination and
> MUST NOT be interpreted to mean that addresses covered by the prefix
> are off-link.

So, we should not drop previously configured routes when receieved a RA
with Prefix Information option without on-link flag.

Closes systemd#28435.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Programming errors, that need preferential fixing ndisc/ra network
2 participants