Skip to content

Commit f85f94b

Browse files
LorenzoBianconidavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9a00b69 commit f85f94b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/ipv6/addrconf.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2529,7 +2529,6 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev,
25292529
if (IS_ERR_OR_NULL(ifp))
25302530
return -1;
25312531

2532-
update_lft = 0;
25332532
create = 1;
25342533
spin_lock_bh(&ifp->lock);
25352534
ifp->flags |= IFA_F_MANAGETEMPADDR;
@@ -2551,7 +2550,7 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev,
25512550
stored_lft = ifp->valid_lft - (now - ifp->tstamp) / HZ;
25522551
else
25532552
stored_lft = 0;
2554-
if (!update_lft && !create && stored_lft) {
2553+
if (!create && stored_lft) {
25552554
const u32 minimum_lft = min_t(u32,
25562555
stored_lft, MIN_VALID_LIFETIME);
25572556
valid_lft = max(valid_lft, minimum_lft);

0 commit comments

Comments
 (0)