diff options
author | 2018-04-16 17:52:59 +0200 | |
---|---|---|
committer | 2018-04-16 18:16:16 -0400 | |
commit | f85f94b87164e77e476218b83a5f67875d6b161c (patch) | |
tree | 2d987d6edaf52db7785d131289e6a06147f78969 /net/ipv6/addrconf.c | |
parent | net: socionext: reset hardware in ndo_stop (diff) | |
download | linux-f85f94b87164e77e476218b83a5f67875d6b161c.tar.gz linux-f85f94b87164e77e476218b83a5f67875d6b161c.tar.bz2 linux-f85f94b87164e77e476218b83a5f67875d6b161c.zip |
ipv6: remove unnecessary check in addrconf_prefix_rcv_add_addr()
Remove unnecessary check on update_lft variable in
addrconf_prefix_rcv_add_addr routine since it is always set to 0.
Moreover remove update_lft re-initialization to 0
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 78cef00c9596..62b97722722c 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2529,7 +2529,6 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev, if (IS_ERR_OR_NULL(ifp)) return -1; - update_lft = 0; create = 1; spin_lock_bh(&ifp->lock); ifp->flags |= IFA_F_MANAGETEMPADDR; @@ -2551,7 +2550,7 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev, stored_lft = ifp->valid_lft - (now - ifp->tstamp) / HZ; else stored_lft = 0; - if (!update_lft && !create && stored_lft) { + if (!create && stored_lft) { const u32 minimum_lft = min_t(u32, stored_lft, MIN_VALID_LIFETIME); valid_lft = max(valid_lft, minimum_lft); |