base-files: default set lan ip6class to wan6

Before this, lan will be assigned ULA-prefix address,
when lan send Neighbor Solicitation to other lan area hosts with ULA-prefix address as source,
some hosts may not respond (macOS, etc.).

https://openwrt.org/docs/guide-user/network/ipv6/configuration#downstream_configuration_for_lan_interfaces
This commit is contained in:
Liangbin Lian 2025-03-28 13:26:38 +08:00
parent 3602c4d85a
commit 8738984c4c

View File

@ -0,0 +1,14 @@
[ "$(uci -q get network.lan)" = "interface" ] || exit 0
[ -z "$(uci -q get network.lan.gateway)" ] || exit 0
[ "$(uci -q get network.wan.proto)" = "dhcp" ] || exit 0
[ "$(uci -q get network.wan6)" = "interface" ] || exit 0
uci -q batch <<-EOF >/dev/null
delete network.lan.ip6class
add_list network.lan.ip6class='wan6'
commit network
EOF
exit 0