* [patch net] net: ipv4: notify when address lifetime changes
@ 2013-04-04 18:33 Jiri Pirko
2013-04-05 4:51 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2013-04-04 18:33 UTC (permalink / raw)
To: netdev; +Cc: davem, kuznet, jmorris, yoshfuji, kaber
if userspace changes lifetime of address, send netlink notification and
call notifier.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
net/ipv4/devinet.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index f678507..96083b7 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;
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch net] net: ipv4: notify when address lifetime changes
2013-04-04 18:33 [patch net] net: ipv4: notify when address lifetime changes Jiri Pirko
@ 2013-04-05 4:51 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-04-05 4:51 UTC (permalink / raw)
To: jiri; +Cc: netdev, kuznet, jmorris, yoshfuji, kaber
From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 4 Apr 2013 20:33:00 +0200
> if userspace changes lifetime of address, send netlink notification and
> call notifier.
>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Applied and queued up for -stable, thanks Jiri.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-05 4:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04 18:33 [patch net] net: ipv4: notify when address lifetime changes Jiri Pirko
2013-04-05 4:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).