diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-04-04 04:33:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-05 00:51:12 -0400 |
commit | 34e2ed34a035de07277cca817fe8264324398141 (patch) | |
tree | 6c3b92197ac44bc22fdc532a9ffb5b402532358a | |
parent | f01fc1a82c2ee68726b400fadb156bd623b5f2f1 (diff) |
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>
-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 | |||
802 | if (nlh->nlmsg_flags & NLM_F_EXCL || | 802 | if (nlh->nlmsg_flags & NLM_F_EXCL || |
803 | !(nlh->nlmsg_flags & NLM_F_REPLACE)) | 803 | !(nlh->nlmsg_flags & NLM_F_REPLACE)) |
804 | return -EEXIST; | 804 | return -EEXIST; |
805 | 805 | ifa = ifa_existing; | |
806 | set_ifa_lifetime(ifa_existing, valid_lft, prefered_lft); | 806 | set_ifa_lifetime(ifa, valid_lft, prefered_lft); |
807 | rtmsg_ifa(RTM_NEWADDR, ifa, nlh, NETLINK_CB(skb).portid); | ||
808 | blocking_notifier_call_chain(&inetaddr_chain, NETDEV_UP, ifa); | ||
807 | } | 809 | } |
808 | return 0; | 810 | return 0; |
809 | } | 811 | } |