netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: core: netpoll: Enable netconsole IPv6 link local address
@ 2018-11-02 18:19 Matwey V. Kornilov
  2018-11-06  1:07 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Matwey V. Kornilov @ 2018-11-02 18:19 UTC (permalink / raw)
  To: David S. Miller
  Cc: matwey.kornilov, Eric Dumazet, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker, Debabrata Banerjee, Dave Jones, netdev,
	linux-kernel, Matwey V. Kornilov

There is no reason to discard using source link local address when
remote netconsole IPv6 address is set to be link local one.

The patch allows administrators to use IPv6 netconsole without
explicitly configuring source address:

    netconsole=@/,@fe80::5054:ff:fe2f:6012/

Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
---
 net/core/netpoll.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 5da9552b186b..2b9fdbc43205 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -717,7 +717,8 @@ int netpoll_setup(struct netpoll *np)
 
 				read_lock_bh(&idev->lock);
 				list_for_each_entry(ifp, &idev->addr_list, if_list) {
-					if (ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL)
+					if (!!(ipv6_addr_type(&ifp->addr) & IPV6_ADDR_LINKLOCAL) !=
+					    !!(ipv6_addr_type(&np->remote_ip.in6) & IPV6_ADDR_LINKLOCAL))
 						continue;
 					np->local_ip.in6 = ifp->addr;
 					err = 0;
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: core: netpoll: Enable netconsole IPv6 link local address
  2018-11-02 18:19 [PATCH] net: core: netpoll: Enable netconsole IPv6 link local address Matwey V. Kornilov
@ 2018-11-06  1:07 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-11-06  1:07 UTC (permalink / raw)
  To: matwey
  Cc: matwey.kornilov, edumazet, mingo, tglx, frederic, dbanerje,
	davej, netdev, linux-kernel

From: "Matwey V. Kornilov" <matwey@sai.msu.ru>
Date: Fri,  2 Nov 2018 21:19:36 +0300

> There is no reason to discard using source link local address when
> remote netconsole IPv6 address is set to be link local one.
> 
> The patch allows administrators to use IPv6 netconsole without
> explicitly configuring source address:
> 
>     netconsole=@/,@fe80::5054:ff:fe2f:6012/
> 
> Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-06  1:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 18:19 [PATCH] net: core: netpoll: Enable netconsole IPv6 link local address Matwey V. Kornilov
2018-11-06  1: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).