lookup IPv4 address only when IPv6 address has changed
This commit is contained in:
parent
ab35869ef6
commit
e2324e8093
|
@ -157,10 +157,10 @@ function main {
|
|||
ip -6 -o monitor address dev $(get_interface) |
|
||||
while IFS= read -r line
|
||||
do
|
||||
ip4=$(lookup_ip4 "$(declare -p config)")
|
||||
local new_ip6=$(parse_ip_monitor_output "${line}")
|
||||
#echo "ip-monitor output was ${line}"
|
||||
if [ -n "${new_ip6}" ] && [ "${new_ip6}" != "${ip6}" ]; then
|
||||
ip4=$(lookup_ip4 "$(declare -p config)")
|
||||
ip6=$new_ip6
|
||||
update "${ip4}" "${ip6}" "$(declare -p config)"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue