diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-04-04 08:33:00 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-05 00:51:12 -0400 |
commit | 34e2ed34a035de07277cca817fe8264324398141 (patch) | |
tree | 6c3b92197ac44bc22fdc532a9ffb5b402532358a /net/ipv4 | |
parent | f01fc1a82c2ee68726b400fadb156bd623b5f2f1 (diff) | |
download | linux-34e2ed34a035de07277cca817fe8264324398141.tar.bz2 |
net: ipv4: notify when address lifetime changes
if userspace changes lifetime of address, send netlink notification and
call notifier.
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 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index f678507bc829..96083b7a436b 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -802,8 +802,10 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg if (nlh->nlmsg_flags & NLM_F_EXCL || !(nlh->nlmsg_flags & NLM_F_REPLACE)) return -EEXIST; - - set_ifa_lifetime(ifa_existing, valid_lft, prefered_lft); + ifa = ifa_existing; + set_ifa_lifetime(ifa, valid_lft, prefered_lft); + rtmsg_ifa(RTM_NEWADDR, ifa, nlh, NETLINK_CB(skb).portid); + blocking_notifier_call_chain(&inetaddr_chain, NETDEV_UP, ifa); } return 0; } |