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

router: implement RFC 7084 errata 7699 #211

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alinnastac
Copy link
Contributor

RFC 7084 L-3 requires router advertisement daemon to send RIO for every prefix delegation that allocates a prefix on the interface. There is one special case though where PIO advertise the on-link prefix route that conflicts with the RIO prefix.

Example:

  • CE-Router receives IA-PD 2001:db8:1234::/64
  • this prefix delegation gets assigned to the lan interface
  • odhcpd advertise on-link PIO with prefix 2001:db8:1234::/64

If original RFC 7084 L-3 would be followed, RA will also contain a RIO with prefix 2001:db8:1234::/64 which will require lan hosts to add the routes
2001:db8:1234::/64 dev br-lan # the on-link prefix route
2001:db8:1234::/64 dev br-lan nexthop fe80::1 # RIO route

RFC 7084 L-3 requires router advertisement daemon to send RIO for
every prefix delegation that allocates a prefix on the interface.
There is one special case though where PIO advertise the on-link
prefix route that conflicts with the RIO prefix.

Example:
 - CE-Router receives IA-PD 2001:db8:1234::/64
 - this prefix delegation gets assigned to the lan interface
 - odhcpd advertise on-link PIO with prefix 2001:db8:1234::/64

If original RFC 7084 L-3 would be followed, RA will also contain
a RIO with prefix 2001:db8:1234::/64 which will require lan hosts
to add the routes
   2001:db8:1234::/64 dev br-lan # the on-link prefix route
   2001:db8:1234::/64 dev br-lan nexthop fe80::1 # RIO route

Signed-off-by: Alin Nastac <[email protected]>
RFC 4191 section 4 states:
   ... When ceasing to be an advertising
   interface and sending Router Advertisements with a Router Lifetime of
   zero, the Router Advertisement SHOULD also set the Route Lifetime to
   zero in all Route Information Options.

Since RIOs reflect the prefix delegations owned by the router, it is
reasonable to assume that invalid RIOs should be sent along invalid PIOs
required by RFC 7084 L-13.

This extends the functionality introduced in commit 83e14f4 where
removed addresses were advertised as invalid PIO in 3 consecutive RAs.

Other related improvements introduced here:
   - further precaution has been taken in netlink.c to prevent possible
    overlapping between current list of interface IPv6 addresses and the
    list of invalid addresses
   - IPv6 route parsing was moved to netlink.c and was splitted in 2
     functions; this allows dprefix caching in iface->addr6 list,
     necessary for generating invalid RIOs after prefix get deleted
   - all prefixes are advertised as invalid on odhcpd shutdown

Signed-off-by: Alin Nastac <[email protected]>
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