diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-04-04 19:39:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-08 12:04:51 -0400 |
commit | 05a324b9c50c3edbe0ce48ee3e37b210859ef1ae (patch) | |
tree | aaadda8e7a1ca69d919afe84b76de8108ff27790 /net/ipv4 | |
parent | cb28ea3b13b86fb23448525f34720e659bda7aa8 (diff) |
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 5c766d642bcaf "ipv4: introduce address lifetime"
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/devinet.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 96083b7a436b..00386e02e708 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -804,6 +804,8 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg | |||
804 | return -EEXIST; | 804 | return -EEXIST; |
805 | ifa = ifa_existing; | 805 | ifa = ifa_existing; |
806 | set_ifa_lifetime(ifa, valid_lft, prefered_lft); | 806 | set_ifa_lifetime(ifa, valid_lft, prefered_lft); |
807 | cancel_delayed_work(&check_lifetime_work); | ||
808 | schedule_delayed_work(&check_lifetime_work, 0); | ||
807 | rtmsg_ifa(RTM_NEWADDR, ifa, nlh, NETLINK_CB(skb).portid); | 809 | rtmsg_ifa(RTM_NEWADDR, ifa, nlh, NETLINK_CB(skb).portid); |
808 | blocking_notifier_call_chain(&inetaddr_chain, NETDEV_UP, ifa); | 810 | blocking_notifier_call_chain(&inetaddr_chain, NETDEV_UP, ifa); |
809 | } | 811 | } |