odhcpd: fix setting default ra mode

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2025-02-08 15:39:55 +08:00
parent fa59b42f0d
commit 76c4deb991
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 # only enable server mode on statically addressed lan ports
"static") "static")
V4MODE=server V4MODE=server
V6MODE=server
;; ;;
esac esac
@ -42,7 +43,7 @@ set dhcp.odhcpd.leasefile=/tmp/hosts/odhcpd
set dhcp.odhcpd.leasetrigger=/usr/sbin/odhcpd-update set dhcp.odhcpd.leasetrigger=/usr/sbin/odhcpd-update
set dhcp.odhcpd.loglevel=4 set dhcp.odhcpd.loglevel=4
set dhcp.lan.dhcpv4=$V4MODE set dhcp.lan.dhcpv4=$V4MODE
set dhcp.lan.dhcpv6=$V6MODE set dhcp.lan.dhcpv6=disabled
set dhcp.lan.ra=$V6MODE set dhcp.lan.ra=$V6MODE
set dhcp.lan.ra_slaac=1 set dhcp.lan.ra_slaac=1
add_list dhcp.lan.ra_flags=other-config add_list dhcp.lan.ra_flags=other-config