odhcpd: fix setting default ra mode

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2025-09-15 14:04:15 +08:00
parent f23e7233f5
commit 65804bf40e
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -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