Commit f85f94b8 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by David S. Miller

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: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9a00b697
...@@ -2529,7 +2529,6 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev, ...@@ -2529,7 +2529,6 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev,
if (IS_ERR_OR_NULL(ifp)) if (IS_ERR_OR_NULL(ifp))
return -1; return -1;
update_lft = 0;
create = 1; create = 1;
spin_lock_bh(&ifp->lock); spin_lock_bh(&ifp->lock);
ifp->flags |= IFA_F_MANAGETEMPADDR; ifp->flags |= IFA_F_MANAGETEMPADDR;
...@@ -2551,7 +2550,7 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev, ...@@ -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; stored_lft = ifp->valid_lft - (now - ifp->tstamp) / HZ;
else else
stored_lft = 0; stored_lft = 0;
if (!update_lft && !create && stored_lft) { if (!create && stored_lft) {
const u32 minimum_lft = min_t(u32, const u32 minimum_lft = min_t(u32,
stored_lft, MIN_VALID_LIFETIME); stored_lft, MIN_VALID_LIFETIME);
valid_lft = max(valid_lft, minimum_lft); valid_lft = max(valid_lft, minimum_lft);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment