1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
Ycarus (Yannick Chabanois) 2020-05-25 14:04:17 +02:00
parent 34f21576ce
commit 4aee443da6
3 changed files with 6 additions and 6 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='fd80::a00:1'
[ -z "$ipv6_gw" ] && ipv6_gw='fd80::a00:1'
[ "$ipv6_gw" = "::" ] && ipv6_gw='fe80::a00:1'
[ -z "$ipv6_gw" ] && ipv6_gw='fe80::a00:1'
#[ -z "$ipv6_gw" ] && ipv6_gw='fe80::aff:ff01'
ip -6 route add ${ipv6_gw} dev 6in4-omr6in4
ip -6 route replace default via ${ipv6_gw} dev 6in4-omr6in4 > /dev/null 2>&1