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

Use fd80 instead of fe80 for 6in4

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-05-01 11:08:31 +02:00
parent f5dc724da7
commit c199d8bc60
2 changed files with 5 additions and 5 deletions

View file

@ -39,8 +39,8 @@ while true; do
ipv6_addr=$(ubus call network.interface.omr6in4 status | jsonfilter -q -l 1 -e '@["ipv6-address"][0].address' | tr -d "\n")
ip -6 addr add $ipv6_addr dev 6in4-omr6in4 > /dev/null 2>&1
ipv6_gw=$(ubus call network.interface.omr6in4 status | jsonfilter -q -l 1 -e '@.route[@.target="::"].nexthop' | tr -d "\n")
[ "$ipv6_gw" = "::" ] && ipv6_gw='fe80::a00:1'
[ -z "$ipv6_gw" ] && ipv6_gw='fe80::a00:1'
[ "$ipv6_gw" = "::" ] && ipv6_gw='fd80::a00:1'
[ -z "$ipv6_gw" ] && ipv6_gw='fd80::a00:1'
#[ -z "$ipv6_gw" ] && ipv6_gw='fe80::aff:ff01'
ip -6 route replace default via ${ipv6_gw} dev 6in4-omr6in4 > /dev/null 2>&1
if [ "$(uci -q get openmptcprouter.settings.uci_route)" = "1" ]; then

View file

@ -10,8 +10,8 @@ if [ "$(uci -q show network | grep omr6in4)" = "" ]; then
set network.omr6in4.multipath=off
set network.omr6in4.ipaddr=10.255.255.2
set network.omr6in4.peeraddr=10.255.255.1
set network.omr6in4.gateway=fe80::a00:1
set network.omr6in4.ip6addr='fe80::a00:2/128'
set network.omr6in4.gateway=fd80::a00:1
set network.omr6in4.ip6addr='fd80::a00:2/128'
set network.omr6in4.auto='0'
commit network
EOF
@ -27,7 +27,7 @@ fi
if [ "$(uci -q get network.omr6in4.ip6addr)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set network.omr6in4.ip6addr=fe80::a00:2
set network.omr6in4.ip6addr=fd80::a00:2
commit network
EOF
fi