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

Change the Prefix field of the Route Information Option to be variable-length. #234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

y-kzm
Copy link

@y-kzm y-kzm commented Nov 1, 2024

This PR enables prefixes to be sent in smaller chunks within the Route Information Options.

According to RFC 4191, Section 2.3:
The Length field is 1, 2, or 3 depending on the Prefix Length. If Prefix Length is greater than 64, then Length must be 3. If Prefix Length is greater than 0, then Length must be 2 or 3. If Prefix Length is zero, then Length must be 1, 2, or 3.

  • Before change
          route info option (24), length 24 (3):  2001:db8:1::1/128, pref=medium, lifetime=300s
            0x0000:  8000 0000 012c 2001 0db8 0001 0000 0000
            0x0010:  0000 0000 0001
          route info option (24), length 24 (3):  2001:db8:2::/64, pref=medium, lifetime=300s
            0x0000:  4000 0000 012c 2001 0db8 0002 0000 0000
            0x0010:  0000 0000 0000
  • After change
          route info option (24), length 24 (3):  2001:db8:1::1/128, pref=medium, lifetime=300s
            0x0000:  8000 0000 012c 2001 0db8 0001 0000 0000
            0x0010:  0000 0000 0001
          route info option (24), length 16 (2):  2001:db8:2::/64, pref=medium, lifetime=300s
            0x0000:  4000 0000 012c 2001 0db8 0002 0000

Comment on lines +580 to +583
} else {
route = route->next;
continue;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

silently dropping the route here seems weird. At the very least it should drop; but also it should be IMPOSSIBLE to reach this if we validate routes earlier.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@y-kzm bump

@Neustradamus
Copy link
Member

@y-kzm: Have you seen @robbat2 review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants