odhcpd: fix setting default ra mode

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 65804bf40e)
This commit is contained in:
Tianling Shen
2025-09-15 14:05:24 +08:00
parent 1be1f3caa5
commit e01d4bf0b0
@@ -21,6 +21,7 @@ case "$protocol" in
# only enable server mode on statically addressed lan ports
"static")
V4MODE=server
[ -e /proc/sys/net/ipv6 ] && V6MODE=server
;;
esac
@@ -42,7 +43,7 @@ set dhcp.odhcpd.leasefile=/tmp/hosts/odhcpd
set dhcp.odhcpd.leasetrigger=/usr/sbin/odhcpd-update
set dhcp.odhcpd.loglevel=4
set dhcp.lan.dhcpv4=$V4MODE
set dhcp.lan.dhcpv6=$V6MODE
set dhcp.lan.dhcpv6=disabled
set dhcp.lan.ra=$V6MODE
set dhcp.lan.ra_slaac=1
set dhcp.lan.max_preferred_lifetime=2700