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

script: don't ignore RA with zero router lifetime #84

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

Conversation

gstukelj
Copy link

@gstukelj gstukelj commented Apr 8, 2024

As per RFC 4861 (section 4.2), 0 is a valid value for Router Lifetime field in Router Advertisement messages. To quote from the RFC:

A Lifetime of 0 indicates that the router is not a default router and SHOULD NOT appear on the default router list.

In fact, this is the mechanism by which a router, previously advertising itself as a default router must invalidate itself. From the RFC 7084 (4.1, G-5):

By default, if the IPv6 CE router is an advertising router and loses its IPv6 default router(s) and/or detects loss of connectivity on the WAN interface, it MUST explicitly invalidate itself as an IPv6 default router on each of its advertising interfaces by immediately transmitting one or more Router Advertisement messages with the "Router Lifetime" field set to zero [RFC4861].

Given that Router Lifetime is stored in the valid field of the struct odhcp6c_entry, entries with the field set to 0 shouldn't be ignored when entry type is ENTRY_ROUTE.

As per RFC 4861 (section 4.2), 0 is a valid value for
Router Lifetime field in Router Advertisement messages.
To quote from the RFC:

> A Lifetime of 0 indicates that the router is not a
> default router and SHOULD NOT appear on the default
> router list.

In fact, this is the mechanism by which a router,
previously advertising itself as a default router must
invalidate itself. From the RFC 7084 (4.1, G-5):

> By default, if the IPv6 CE router is an advertising
> router and loses its IPv6 default router(s) and/or
> detects loss of connectivity on the WAN interface,
> it MUST explicitly invalidate itself as an IPv6
> default router on each of its advertising interfaces
> by immediately transmitting one or more Router
> Advertisement messages with the "Router Lifetime"
> field set to zero [RFC4861].

Given that Router Lifetime is stored in the `valid`
field of the `struct odhcp6c_entry`, entries with
the field set to 0 shouldn't be ignored when entry
type is `ENTRY_ROUTE`.

Signed-off-by: Gasper Stukelj <gstukelj@plume.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant