odhcpd: document the "ra_advrouter" option
authorDavid Härdeman <[email protected]>
Sun, 26 Oct 2025 08:57:03 +0000 (09:57 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Thu, 6 Nov 2025 07:24:51 +0000 (08:24 +0100)
Might see little practical use in the field, but the option is there, so let's
document it. Also align the documentation for the "ra_slaac" option.

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/294
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
README.md
src/router.c

index 8e70f8591433dcc34e7e50702bf343e914f3748f..0ee2e22d76ec89cfae27835aacc308bbb748209c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -102,7 +102,8 @@ and may also receive information from ubus
 | max_valid_lifetime   |string | 90m   | Upper limit for the valid lifetime for a prefix |
 | ra_default           |integer| 0     | Override default route - 0: default, 1: ignore no public address, 2: ignore all |
 | ra_flags             |list   |other-config| List of RA flags to be advertised in RA messages [managed-config\|other-config\|home-agent\|none] |
-| ra_slaac             |bool   | 1     | Announce slaac for a prefix |
+| ra_slaac             |bool   | 1     | Advertise that prefixes (which are <= 64 bits long) on this interface can be used for SLAAC (the "A" flag in the PIO, RFC4861, §4.6.2) |
+| ra_advrouter         |bool   | 0     | Advertise the IPv6 address of this router in RA messages (the "R" flag in the PIO, RFC6275, §7.2) |
 | ra_offlink           |bool   | 0     | Announce prefixes off-link |
 | ra_preference                |string | medium| Route(r) preference [medium\|high\|low] |
 | ra_maxinterval       |integer| 600   | Maximum time allowed between sending unsolicited RA |
@@ -120,7 +121,6 @@ and may also receive information from ubus
 | prefix_filter                |string |`::/0` | Only advertise on-link prefixes within the provided IPv6 prefix; others are filtered out. [IPv6 prefix] |
 | ntp                  |list   |`<local address>`| NTP servers to announce accepts IPv4 and IPv6 |
 | upstream             |list   | -     | TBD |
-| ra_advrouter         |bool   | -     | TBD |
 
 [//]: # "dhcpv6_raw - string - not documented, may change when generic DHCPv4/DHCPv6 options are added"
 
index 46b6ce4ffecc87b7a9f939941efef671d15604e2..9b8d002d2c16ddf2339d4b24fca5907c429b0fcd 100644 (file)
@@ -743,6 +743,7 @@ static int send_router_advert(struct interface *iface, const struct in6_addr *fr
                if (iface->ra_slaac && addr->prefix <= 64)
                        p->nd_opt_pi_flags_reserved |= ND_OPT_PI_FLAG_AUTO;
                if (iface->ra_advrouter)
+                       // RFC6275, §7.2
                        p->nd_opt_pi_flags_reserved |= ND_OPT_PI_FLAG_RADDR;
                if (i >= valid_addr_cnt || !preferred_lt) {
                        /*