Skip to content

Commit 05a324b

Browse files
jpirkodavem330
authored andcommitted
net: ipv4: reset check_lifetime_work after changing lifetime
This will result in calling check_lifetime in nearest opportunity and that function will adjust next time to call check_lifetime correctly. Without this, check_lifetime is called in time computed by previous run, not affecting modified lifetime. Introduced by: commit 5c766d6 "ipv4: introduce address lifetime" Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent cb28ea3 commit 05a324b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/ipv4/devinet.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,8 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg
804804
return -EEXIST;
805805
ifa = ifa_existing;
806806
set_ifa_lifetime(ifa, valid_lft, prefered_lft);
807+
cancel_delayed_work(&check_lifetime_work);
808+
schedule_delayed_work(&check_lifetime_work, 0);
807809
rtmsg_ifa(RTM_NEWADDR, ifa, nlh, NETLINK_CB(skb).portid);
808810
blocking_notifier_call_chain(&inetaddr_chain, NETDEV_UP, ifa);
809811
}

0 commit comments

Comments
 (0)