diff options
author | Dan Williams <dcbw@redhat.com> | 2010-05-14 09:48:46 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-05-14 09:48:46 -0700 |
commit | 0b8ee13ee0ae6b6a344473e674849c05aca3ca08 (patch) | |
tree | b6aabb16bc51fb22d314d4bdf5c02b62cc5103bc | |
parent | 42eb1f38ccc9da422a5590781f3fa49a85869068 (diff) | |
download | NetworkManager-0b8ee13ee0ae6b6a344473e674849c05aca3ca08.tar.gz |
ip6: pad RDNSS server expiry slightly to avoid hiccups (rh #590202)
Pad the DNS server expiry somewhat to give a bit of slack in cases
where one RA gets lost or something (which can happen on unreliable
links like wifi where certain types of frames are not retransmitted).
-rw-r--r-- | src/ip6-manager/nm-ip6-manager.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ip6-manager/nm-ip6-manager.c b/src/ip6-manager/nm-ip6-manager.c index ba6be259f8..f6f6127ce7 100644 --- a/src/ip6-manager/nm-ip6-manager.c +++ b/src/ip6-manager/nm-ip6-manager.c @@ -627,7 +627,12 @@ process_nduseropt (NMIP6Manager *manager, struct nl_msg *msg) rdnss_opt = (struct nd_opt_rdnss *) opt; - server.expires = now + ntohl (rdnss_opt->nd_opt_rdnss_lifetime); + /* Pad the DNS server expiry somewhat to give a bit of slack in cases + * where one RA gets lost or something (which can happen on unreliable + * links like wifi where certain types of frames are not retransmitted). + */ + server.expires = now + ntohl (rdnss_opt->nd_opt_rdnss_lifetime) + 10; + for (addr = (struct in6_addr *) (rdnss_opt + 1); nd_opt_len >= 2; addr++, nd_opt_len -= 2) { char buf[INET6_ADDRSTRLEN + 1]; |