multiwan-script: added some network_flush_cache to get fresh data

This commit is contained in:
Reidar Cederqvist 2017-01-13 10:53:53 +01:00
parent ecaae37784
commit c22ff6da15

View file

@ -138,6 +138,7 @@ acquire_wan_data() {
local old_gateway
local ifname ipaddr gateway
network_flush_cache
network_get_device ifname ${1} || ifname=x
network_get_ipaddr ipaddr ${1} || ipaddr=x
network_get_gateway gateway ${1} || gateway=x
@ -445,6 +446,8 @@ refresh_dns() {
local compile_dns
local dns_server
network_flush_cache
iptables -F MultiWanDNS -t mangle
rm /tmp/resolv.conf.auto
@ -822,6 +825,7 @@ monitor_wan() {
while :; do
[ "${health_monitor%.*}" = 'parallel' ] && sleep $health_interval
network_flush_cache
network_get_device ifname ${1} || ifname=x
network_get_ipaddr ipaddr ${1} || ipaddr=x
network_get_gateway gateway ${1} || gateway=x