Browse Source

lookup IPv4 address only when IPv6 address has changed

master
lurchi 3 years ago
parent
commit
e2324e8093
  1. 2
      homeserverdns-daemon

2
homeserverdns-daemon

@ -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…
Cancel
Save