aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2010-06-26 07:42:55 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-30 13:28:43 -0400
commit784e2710ce3588d8316dc8efac9ecbebaeaf7c35 (patch)
tree5d731c6b0f67f6e0567c34a6fcde2b9630641d17 /net/ipv6/addrconf.c
parentf56619fc72407561b00c52244a2caa53d730bc4a (diff)
ipv6: Use interface max_desync_factor instead of static default
max_desync_factor can be configured per-interface, but nothing is using the value. Reported-by: Piotr Lewandowski <piotr.lewandowski@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 51a273fe3d21..2514adf5251e 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -121,8 +121,6 @@ static inline void addrconf_sysctl_unregister(struct inet6_dev *idev)
121static int __ipv6_regen_rndid(struct inet6_dev *idev); 121static int __ipv6_regen_rndid(struct inet6_dev *idev);
122static int __ipv6_try_regen_rndid(struct inet6_dev *idev, struct in6_addr *tmpaddr); 122static int __ipv6_try_regen_rndid(struct inet6_dev *idev, struct in6_addr *tmpaddr);
123static void ipv6_regen_rndid(unsigned long data); 123static void ipv6_regen_rndid(unsigned long data);
124
125static int desync_factor = MAX_DESYNC_FACTOR * HZ;
126#endif 124#endif
127 125
128static int ipv6_generate_eui64(u8 *eui, struct net_device *dev); 126static int ipv6_generate_eui64(u8 *eui, struct net_device *dev);
@@ -893,7 +891,8 @@ retry:
893 idev->cnf.temp_valid_lft); 891 idev->cnf.temp_valid_lft);
894 tmp_prefered_lft = min_t(__u32, 892 tmp_prefered_lft = min_t(__u32,
895 ifp->prefered_lft, 893 ifp->prefered_lft,
896 idev->cnf.temp_prefered_lft - desync_factor / HZ); 894 idev->cnf.temp_prefered_lft -
895 idev->cnf.max_desync_factor);
897 tmp_plen = ifp->prefix_len; 896 tmp_plen = ifp->prefix_len;
898 max_addresses = idev->cnf.max_addresses; 897 max_addresses = idev->cnf.max_addresses;
899 tmp_cstamp = ifp->cstamp; 898 tmp_cstamp = ifp->cstamp;
@@ -1653,7 +1652,8 @@ static void ipv6_regen_rndid(unsigned long data)
1653 1652
1654 expires = jiffies + 1653 expires = jiffies +
1655 idev->cnf.temp_prefered_lft * HZ - 1654 idev->cnf.temp_prefered_lft * HZ -
1656 idev->cnf.regen_max_retry * idev->cnf.dad_transmits * idev->nd_parms->retrans_time - desync_factor; 1655 idev->cnf.regen_max_retry * idev->cnf.dad_transmits * idev->nd_parms->retrans_time -
1656 idev->cnf.max_desync_factor * HZ;
1657 if (time_before(expires, jiffies)) { 1657 if (time_before(expires, jiffies)) {
1658 printk(KERN_WARNING 1658 printk(KERN_WARNING
1659 "ipv6_regen_rndid(): too short regeneration interval; timer disabled for %s.\n", 1659 "ipv6_regen_rndid(): too short regeneration interval; timer disabled for %s.\n",