net: ipv4: notify when address lifetime changes
Subsystems (3)
PATCH 1/1 net: ipv4: notify when address lifetime changes
if userspace changes lifetime of address, send netlink notification and call notifier.
Signed-off-by Jiri Pirko <[email protected]>
--- net/ipv4/devinet.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/ipv4/devinet.c +4 -2
@@ -802,8 +802,10 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *argif (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 ; }
Signature · 1 line
1.8.1.2
David Miller
maintainerFrom: Jiri Pirko <[email protected]>
Date: Thu, 4 Apr 2013 20:33:00 +0200
Quoted 4 lines
if userspace changes lifetime of address, send netlink notification and call notifier.
Signed-off-by Jiri Pirko <[email protected]>
Applied and queued up for -stable, thanks Jiri.