summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Härdeman2025-10-26 08:57:03 +0000
committerÁlvaro Fernández Rojas2025-11-06 07:24:51 +0000
commit56c06a162a4f1fa624a5cc8f863f942813717a44 (patch)
treee2b17d9ace0cc65e6d31c584b8bd2dc4d647f378
parente3aaf3312cd5c118179bc88fe6b16947b831dcd9 (diff)
downloadodhcpd-56c06a162a4f1fa624a5cc8f863f942813717a44.tar.gz
odhcpd: document the "ra_advrouter" option
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 <david@hardeman.nu> Link: https://github.com/openwrt/odhcpd/pull/294 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
-rw-r--r--README.md4
-rw-r--r--src/router.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/README.md b/README.md
index 8e70f85..0ee2e22 100644
--- 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"
diff --git a/src/router.c b/src/router.c
index 46b6ce4..9b8d002 100644
--- a/src/router.c
+++ b/src/router.c
@@ -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) {
/*