1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge pull request #299 from Ysurac/develop

Various IPv6 fixes
This commit is contained in:
suyuan 2023-01-05 14:22:36 +08:00 committed by GitHub
commit 41fdcd5bad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 17 deletions

View file

@ -388,9 +388,11 @@ function wizard_add()
if ip6addr ~= "" then
ucic:set("network",intf,"ip6addr",ip6addr:gsub("%s+", ""))
ucic:set("network",intf,"ip6gw",ip6gw:gsub("%s+", ""))
ucic:set("network",intf,"ipv6","1")
else
ucic:set("network",intf,"ip6addr","")
ucic:set("network",intf,"ip6gw","")
ucic:set("network",intf,"ipv6","0")
end
if proto == "dhcpv6" then

View file

@ -135,11 +135,11 @@ _set_omr_ip() {
server=$1
serverip="$(uci -q get openmptcprouter.${server}.ip)"
if [ -n "$serverip" ]; then
uci -q batch <<-EOF >/dev/null
delete openmptcprouter.${server}.ip
add_list openmptcprouter.${server}.ip="${serverip}"
commit openmptcprouter
EOF
uci -q delete openmptcprouter.${server}.ip
for ip in ${serverip}; do
uci -q add_list openmptcprouter.${server}.ip="${ip}"
done
uci -q commit openmptcprouter
fi
}