1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Small fixes

This commit is contained in:
Ycarus 2018-12-10 20:46:29 +01:00
parent bb122c0620
commit f78144d994
2 changed files with 8 additions and 3 deletions

View file

@ -45,11 +45,16 @@ interface_multipath_settings() {
config_get enabled "$config" auto "1"
config_get iface "$config" ifname
count=$(($count+1))
id=$count
ip rule del table $id > /dev/null 2>&1
ip route flush $id > /dev/null 2>&1
ip -6 rule del table 6$id > /dev/null 2>&1
ip -6 route flush 6$id > /dev/null 2>&1
[ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]')
[ "$enabled" = "0" ] && return 0
id=$count
[ -n "$intf" ] && [ "$iface" != "$intf" ] && return 0
[ -z "$iface" ] && return 0
[ -n "$(ifconfig | grep $iface)" ] || return 0

View file

@ -288,7 +288,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(
local ip6addr="$(curl -s -6 -m 3 http://ifconfig.co/)"
}
if [ "$(uci -q get openmptcprouter.settings.ipv6_disable)" = "0" ]; then
if [ -n "$ip6addr" ] && [ "$(uci -q set dhcp.lan.ra_default)" != 1 ]; then
if [ -n "$ip6addr" ] && [ "$(uci -q get dhcp.lan.ra_default)" != 1 ]; then
_log "Enable IPv6 RA"
uci -q set dhcp.lan.ra=server
uci -q set dhcp.lan.ra_default=1
@ -362,7 +362,7 @@ fi
[ -n "$OMR_TRACKER_LATENCY" ] && {
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency="$OMR_TRACKER_LATENCY"
if [ "$multipath_config" = "on" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.multipath)" != "master" ] && [ "$(uci -q get openmptcprouter.settings.master)" = "dynamic" ]; then
masterintf="$(uci show network | grep multipath=\'master\' | cut -d'.' -f2)"
masterintf="$(uci -q show network | grep multipath=\'master\' | cut -d'.' -f2)"
masterlatency="$(uci -q get openmptcprouter.$masterintf.latency | tr -d '\n')"
if [ -n "$masterintf" ] && [ "$masterlatency" != "" ] && [ "$masterlatency" -gt "$(($OMR_TRACKER_LATENCY*2))" ]; then
uci -q set network.$masterintf.multipath='on'