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 RFC4191: Processing Router Advertisement with Route Information Option (Host Only) [v6LC.2.2.23 Part C] #28449

Closed
LiveFreeAndRoam opened this issue Jul 18, 2023 · 9 comments · Fixed by #28473
Labels
bug 🐛 Programming errors, that need preferential fixing ndisc/ra network

Comments

@LiveFreeAndRoam
Copy link
Contributor

LiveFreeAndRoam commented Jul 18, 2023

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

Purpose: Verify that the HUT uses a Route Information Options to choose the next-hop.

RFC4191 – Section 2.3 Route Information Option's Prf field:

If the Reserved (10) value is received, the Route Information Option MUST be ignored.

Unexpected behaviour you saw

Processed the RA's Route Information Option (RIO) with PRF set to Reserved

Steps to reproduce the problem

Please find attached a zip file containing two PCAP files, legacy and networkd. The legacy PCAP shows the correct behavior. It was recorded when our host was configured using Debian's legacy /etc/network/interfaces file and networkd was disabled and stopped. The networkd PCAP shows incorrect behavior. It was recorded after configuring networkd to manage the interface.

Under the networkd folder, the PCAP file v6LC_2_2_23c-Net0-20230707043730-filtered.pcapng shows the incorrect behaviour. The PCAP file under the legacy folder shows the correct behaviour.

A summary of the protocol exchange is:

1: Router1 RA Def Rtr Prf: Medium, RIO 2001:2:0:2000::/64 Prf: Low 
2: Router2 RA Def Rtr Prf: Medium, RIO 2001:2:0:2000::/64 Prf: Reserved
3: Router2 forwards "Echo Request" from host TN2 2001:2:0:2000:2
4: Host sends "Echo Reply" with next hop equal to which router???

From RFC4191, section 2.3, it describes the Prf field, stating:

If the Reserved (10) value is received, the Route Information Option MUST be ignored.

As such, you would expect that the Echo reply must be sent to next hop of Router1, since it has a RIO prefix that matches. However, networkd sends the echo reply to next hop Router2.

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

See IPv6 Core Conformance, Test v6LC.2.2.23.

@LiveFreeAndRoam LiveFreeAndRoam added the bug 🐛 Programming errors, that need preferential fixing label Jul 18, 2023
@ssahani
Copy link
Contributor

ssahani commented Jul 19, 2023

missing v6LC_2_2_23c-Net0-20230707043730-filtered.pcapng ?

@LiveFreeAndRoam
Copy link
Contributor Author

Sorry about that. Here it is:

2_2_23c - Processing Router Advertisements with Router Preference.zip

@ssahani
Copy link
Contributor

ssahani commented Jul 20, 2023

Could you please test with #28473. I did not have the environment

@LiveFreeAndRoam
Copy link
Contributor Author

Hi @ssahani,

Thank you for the fix, although I'm also not currently setup to test it and soon will be away for a few weeks. I have opened a new issue #28502 that summarises the failing cases that I encountered. Because there are so many (83), it's not going to be practical for me to report and validate them one by one. I'm hoping the systemd-devel team will take on the testing and validation of their IPv6 implementation. I'm sure you can appreciate the severity of so many IPv6 protocol non-conformance issues and hopeful they will get prioritised and dedicated attention.

If it helps, I'll be glad to discuss further offline and can help you get setup with an environment for testing.

@LiveFreeAndRoam
Copy link
Contributor Author

@ssahani @yuwata @keszybz

I have confirmed this has been fixed. Log files attached.

v6LC_2_2_23c-20230911030614.zip

@yuwata
Copy link
Member

yuwata commented Sep 11, 2023

@LiveFreeAndRoam Thank you for testing.
@ssahani Thank you for your work!

@LiveFreeAndRoam
Copy link
Contributor Author

And thank you Susant. I very much appreciate your fixes. Given there are so many remaining, I'm about to roll up my sleeves and see if I can contribute some fixes myself.

@ssahani
Copy link
Contributor

ssahani commented Sep 11, 2023

@LiveFreeAndRoam Thank you for testing.
@ssahani Thank you for your work!

Thanks @yuwata for reviewing ~

@LiveFreeAndRoam LiveFreeAndRoam changed the title IPv6 Compliance RFC4191: Processing Router Advertisement with Route Information Option (Host Only) IPv6 Compliance RFC4191: Processing Router Advertisement with Route Information Option (Host Only) [Part C] Mar 4, 2024
@LiveFreeAndRoam
Copy link
Contributor Author

Also see related #31606.

@LiveFreeAndRoam LiveFreeAndRoam changed the title IPv6 Compliance RFC4191: Processing Router Advertisement with Route Information Option (Host Only) [Part C] IPv6 Compliance RFC4191: Processing Router Advertisement with Route Information Option (Host Only) [v6LC.2.2.23 Part C] Mar 19, 2024
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
Development

Successfully merging a pull request may close this issue.

3 participants