* [PATCH v2 net-next] net: ipv6: send unsolicited NA if enabled for all interfaces
@ 2017-04-22 16:10 David Ahern
2017-04-24 9:42 ` Simon Horman
2017-04-24 18:07 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: David Ahern @ 2017-04-22 16:10 UTC (permalink / raw)
To: netdev; +Cc: hannes, David Ahern
When arp_notify is set to 1 for either a specific interface or for 'all'
interfaces, gratuitous arp requests are sent. Since ndisc_notify is the
ipv6 equivalent to arp_notify, it should follow the same semantics.
Commit 4a6e3c5def13 ("net: ipv6: send unsolicited NA on admin up") sends
the NA on admin up. The final piece is checking devconf_all->ndisc_notify
in addition to the per device setting. Add it.
Fixes: 5cb04436eef6 ("ipv6: add knob to send unsolicited ND on link-layer address change")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
---
v2
- update commit message with subject of commit 4a6e3c5def13 per comment
from Sergei
net/ipv6/ndisc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index b23822e64228..d310dc41209a 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1753,7 +1753,8 @@ static int ndisc_netdev_event(struct notifier_block *this, unsigned long event,
idev = in6_dev_get(dev);
if (!idev)
break;
- if (idev->cnf.ndisc_notify)
+ if (idev->cnf.ndisc_notify ||
+ net->ipv6.devconf_all->ndisc_notify)
ndisc_send_unsol_na(dev);
in6_dev_put(idev);
break;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 net-next] net: ipv6: send unsolicited NA if enabled for all interfaces
2017-04-22 16:10 [PATCH v2 net-next] net: ipv6: send unsolicited NA if enabled for all interfaces David Ahern
@ 2017-04-24 9:42 ` Simon Horman
2017-04-24 18:07 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2017-04-24 9:42 UTC (permalink / raw)
To: David Ahern; +Cc: netdev, hannes
On Sat, Apr 22, 2017 at 09:10:13AM -0700, David Ahern wrote:
> When arp_notify is set to 1 for either a specific interface or for 'all'
> interfaces, gratuitous arp requests are sent. Since ndisc_notify is the
> ipv6 equivalent to arp_notify, it should follow the same semantics.
> Commit 4a6e3c5def13 ("net: ipv6: send unsolicited NA on admin up") sends
> the NA on admin up. The final piece is checking devconf_all->ndisc_notify
> in addition to the per device setting. Add it.
>
> Fixes: 5cb04436eef6 ("ipv6: add knob to send unsolicited ND on link-layer address change")
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
> ---
> v2
> - update commit message with subject of commit 4a6e3c5def13 per comment
> from Sergei
>
> net/ipv6/ndisc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
> index b23822e64228..d310dc41209a 100644
> --- a/net/ipv6/ndisc.c
> +++ b/net/ipv6/ndisc.c
> @@ -1753,7 +1753,8 @@ static int ndisc_netdev_event(struct notifier_block *this, unsigned long event,
> idev = in6_dev_get(dev);
> if (!idev)
> break;
> - if (idev->cnf.ndisc_notify)
> + if (idev->cnf.ndisc_notify ||
> + net->ipv6.devconf_all->ndisc_notify)
> ndisc_send_unsol_na(dev);
> in6_dev_put(idev);
> break;
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 net-next] net: ipv6: send unsolicited NA if enabled for all interfaces
2017-04-22 16:10 [PATCH v2 net-next] net: ipv6: send unsolicited NA if enabled for all interfaces David Ahern
2017-04-24 9:42 ` Simon Horman
@ 2017-04-24 18:07 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-04-24 18:07 UTC (permalink / raw)
To: dsa; +Cc: netdev, hannes
From: David Ahern <dsa@cumulusnetworks.com>
Date: Sat, 22 Apr 2017 09:10:13 -0700
> When arp_notify is set to 1 for either a specific interface or for 'all'
> interfaces, gratuitous arp requests are sent. Since ndisc_notify is the
> ipv6 equivalent to arp_notify, it should follow the same semantics.
> Commit 4a6e3c5def13 ("net: ipv6: send unsolicited NA on admin up") sends
> the NA on admin up. The final piece is checking devconf_all->ndisc_notify
> in addition to the per device setting. Add it.
>
> Fixes: 5cb04436eef6 ("ipv6: add knob to send unsolicited ND on link-layer address change")
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
> ---
> v2
> - update commit message with subject of commit 4a6e3c5def13 per comment
> from Sergei
Applied, thanks David.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-24 18:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-22 16:10 [PATCH v2 net-next] net: ipv6: send unsolicited NA if enabled for all interfaces David Ahern
2017-04-24 9:42 ` Simon Horman
2017-04-24 18:07 ` 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).