From: Steven Barth Date: Wed, 5 Mar 2014 08:11:24 +0000 (+0100) Subject: ra: don't set nd_ra_{reachable,retransmit} to 0 X-Git-Tag: debian/1.1+git20160131-1~79 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=7c733630c49f1c8a7a43e701fa0b849ab9e473a5;p=odhcp6c.git ra: don't set nd_ra_{reachable,retransmit} to 0 --- diff --git a/src/ra.c b/src/ra.c index 560552f..3e36f94 100644 --- a/src/ra.c +++ b/src/ra.c @@ -311,11 +311,13 @@ bool ra_process(void) update_proc("conf", "hop_limit", adv->nd_ra_curhoplimit); // Parse ND parameters - if (ntohl(adv->nd_ra_reachable) <= 3600000) - update_proc("neigh", "base_reachable_time_ms", ntohl(adv->nd_ra_reachable)); + uint32_t reachable = ntohl(adv->nd_ra_reachable); + if (reachable > 0 && reachable <= 3600000) + update_proc("neigh", "base_reachable_time_ms", reachable); - if (ntohl(adv->nd_ra_retransmit) <= 60000) - update_proc("neigh", "retrans_time_ms", ntohl(adv->nd_ra_retransmit)); + uint32_t retransmit = ntohl(adv->nd_ra_retransmit); + if (retransmit > 0 && retransmit <= 60000) + update_proc("neigh", "retrans_time_ms", retransmit); // Evaluate options