Fix IPv6 IP not being updated in hosts file when a change occurs.
There have been multiple reports from users experiencing excessive and frequent restarts
of dnsmasq when IPv6 is enabled and no IP/prefix change has taken place. Dhcp6c frequently
renewing a lease may result from several factors but a likely source is short timers set
by ISPs on their dhcpv6 servers. This adds a check of the LAN interfaces current IPv6 IP
against the IP stored in NVRAM. If they are different, dhcp6c-state is run in its entirety.
If not, the process of updating NVRAM variables and restarting dnsmasq/httpd is bypassed.
Updates to dns servers recevied by dhcp6c are performed in either case as dnsmasq actively
polls for these changes and does not require a restart to implement them.
Added a call to set_host_domain_name() when an IP change is confirmed so /etc/hosts
is updated with the new IP.IP/prefix address has actually changed before restarting dnsmasq/httpd.
Fix IPv6 IP not being updated in hosts file when a change occurs.
There have been multiple reports from users experiencing excessive and frequent restarts
of dnsmasq when IPv6 is enabled and no IP/prefix change has taken place. Dhcp6c frequently
renewing a lease may result from several factors but a likely source is short timers set
by ISPs on their dhcpv6 servers. This adds a check of the LAN interfaces current IPv6 IP
against the IP stored in NVRAM. If they are different, dhcp6c-state is run in its entirety.
If not, the process of updating NVRAM variables and restarting dnsmasq/httpd is bypassed.
Updates to dns servers recevied by dhcp6c are performed in either case as dnsmasq actively
polls for these changes and does not require a restart to implement them.
Added a call to set_host_domain_name() when an IP change is confirmed so /etc/hosts
is updated with the new IP.
Rapid-commit reduces the messages required for dhcpv6 leases from 4 to 2. This requires
both client AND server(s) to have this option enabled. If only the client is configured
to use it the server(s) will return a standard advertisement instead of the expected reply
message. Dhcp6c waits for timer to expire if no valid reply message is received and then
will process an advertisement or send solicit. This may also be a cause of unnecessary release
and solicits when an advertisement is received from a different server than originally issued
the lease in a multi-server network and the servers are not rapid-commit enabled ( dhcp6c returns
"unexpected_advertise" and generates new XID/reply ).
These fixes come directly from AsusWRT/Merlin.
nvram save -- would output every NVRAM key/value to stdout
due to #ifdef/#endif conditions being commented out
nvram restore -- depending on what characters were used in
NVRAM variables (keys or values), and the obfuscation method
involving random numbers implemented by Asus, it was possible
that certain values, ranges, or byte sequences of characters
may cause restoration problems.
nvram usage syntax -- restore showing the usage syntax if
there are no matching arguments, i.e. "nvram djdsjqd" should
now show usage syntax rather than nothing.
Reference: https://github.com/RMerl/asuswrt-merlin/blob/master/release/src/router/nvram_arm/main.c
Reference: http://www.linksysinfo.org/index.php?threads/tomato-arm-cfg-file.73093/#post-282981