Bug 263982 - IPv6 Router Advertisement - Route Information Option
Summary: IPv6 Router Advertisement - Route Information Option
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Pouria Mousavizadeh Tehrani
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-15 11:45 UTC by Filipe Mendonça
Modified: 2026-04-16 19:39 UTC (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filipe Mendonça 2022-05-15 11:45:51 UTC
The ICMPv6 Router Advertisement messages with Route Information Option (option 24) are ignored by the kernel, as shown by the following debug message.

 nd6_options: unsupported option 24 - option ignored

This causes the specific routes sent by routers not being added to the system routing table.

Is it possible to support this option in FreeBSD kernel? It's defined in RFC4191 and supported in other OS such as Linux, Windows, macOS...
Comment 1 Alex Wied 2022-12-16 22:42:56 UTC
By default, pfSense configures radvd to use this NDP option to advertise ::/0. As a result, FreeBSD machines on my network discard the RA messages.

See: https://github.com/pfsense/pfsense/blob/db6dd2d2d288fdd64b9e741db0900c5eb15ba9fb/src/etc/inc/services.inc#L236-L255
Comment 2 Zhenlei Huang freebsd_committer freebsd_triage 2022-12-19 01:24:45 UTC
(In reply to Filipe Mendonça from comment #0)
> Is it possible to support this option in FreeBSD kernel? It's defined in RFC4191 and
> supported in other OS such as Linux, Windows, macOS...

A quick look at the RFC4191 I think it is possible.
Comment 3 Alex Wied 2024-04-24 20:55:37 UTC
Is there any plan to fix this? It's strange to me that a pfSense router (which runs FreeBSD) would cause issues for a FreeBSD machine.
Comment 4 David T 2024-10-31 00:33:25 UTC
So I wrote this: https://github.com/dxdxdt/gists/blob/master/writeups/ipv6/rfc4191/rfc4191.md

RIO is a quite recent invention in Apple products as well. Neat thing to have, if you ask me. Hopefully, I'll get to update the table soon.

I find it so funny how pfSense is using RIO to push default route, but rtsold can't use it! lol

Having said that, many legacy devices might have trouble parsing it, too. It's not enabled in Linux kernel by default either, so some embedded systems will have the same issue. I for one think that pfSense is in the wrong, not rtsold.
Comment 5 David T 2024-11-16 01:10:06 UTC
UPDATE: a few things to look out for

I just learned that NetworkManager ignores lifetime value in RA messages. What it also ignores is the RIO with zero prefix length, which is in violation of RFC 4191. Pushing default route with an RIO is valid, inferred from following:

> When a type C host receives a Router Advertisement, it modifies its
   Routing Table as follows.  When processing a Router Advertisement, a
   type C host first updates a ::/0 route based on the Router Lifetime
   and Default Router Preference in the Router Advertisement message
   header.  Then as the host processes Route Information Options in the
   Router Advertisement message body, it updates its routing table for
   each such option.  The Router Preference and Lifetime values in a
   ::/0 Route Information Option override the preference and lifetime
   values in the Router Advertisement header.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/ndisc/nm-lndp-ndisc.c#L243

Bugs like these may have prompted pfSense devs to use RIO to push default route. There could be some implementations that ignore the lifetime value in the header but honor lifetime value in the RIO. I'd suggest carefully reviewing RFC 4191 before implementing it in rtsold.

The lifetime field is crucial when making the network fault-tolerant against router failures.
Comment 6 Titus von Boxberg 2026-02-08 20:05:35 UTC
Still no plan to implement?

Basically this means that a FreeBSD host is incompatible with any IPv6 router using RFC 4191, especially radvd.

Since it just took me 5 hours to find the missing implementation to be the root cause of my FreeBSD host IPv6 routing problems:

would be nice if someone with sufficient permissions could change the title of this bug report to a more concrete problem, maybe something like:

"IPv6 Router Advertisement: radvd incompatible / RFC 4191 ignored".
Comment 7 commit-hook freebsd_committer freebsd_triage 2026-04-16 19:38:17 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=c8d25804f56ae7c35eaa492b6110807a2675d41a

commit c8d25804f56ae7c35eaa492b6110807a2675d41a
Author:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
AuthorDate: 2026-04-16 14:23:49 +0000
Commit:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-04-16 18:57:07 +0000

    nd6: Add support for route information (RFC 4191)

    Implement RFC 4191 by handling received Router Adverisement (RA)
    packets with route information option.
    For default routes, use the route information's lifetime and
    preference to overwrite the RA's lifetime/preference.
    Also install and update more-specific route prefixes with the
    option's lifetime and expire them when their lifetime elapses.

    PR:             263982
    Reviewed by:    markj
    Tested by:      Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
    Relnotes:       yes
    Differential Revision: https://reviews.freebsd.org/D55449

 sys/net/route/nhop_ctl.c |   1 +
 sys/netinet/icmp6.h      |   2 +
 sys/netinet6/nd6.c       |   8 ++
 sys/netinet6/nd6.h       |  14 +-
 sys/netinet6/nd6_rtr.c   | 337 ++++++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 360 insertions(+), 2 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2026-04-16 19:38:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=4dc6522d57c748cdaddd8327909574360a3de517

commit 4dc6522d57c748cdaddd8327909574360a3de517
Author:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
AuthorDate: 2026-04-01 13:29:15 +0000
Commit:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-04-16 19:03:08 +0000

    rtadvd(8): Set route info lifetime to 0 during shutdown

    RFC 4191 section 3.1: if the received route's lifetime
    is zero, the route is removed from the Routing Table if present.
    Also, do not tell route information option is unknown.

    PR:             263982
    Reviewed by:    markj
    Differential Revision: https://reviews.freebsd.org/D55448

 usr.sbin/rtadvd/config.c |  3 +++
 usr.sbin/rtadvd/rtadvd.c | 17 +++++++++++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)