mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 00:38:55 +00:00
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>
This commit is contained in:
parent
f01fc1a82c
commit
34e2ed34a0
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user