summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMatwey V. Kornilov <matwey@sai.msu.ru>2018-11-02 21:19:36 +0300
committerDavid S. Miller <davem@davemloft.net>2018-11-05 17:07:10 -0800
commitd016b4a3562b745fd9fa387a47d8de62ccd7e241 (patch)
treedde9a7c3e91def3f277b0cef38318a089ddee188 /net
parente22d0bfa09a56e427a1a950ccb85621c86b343a4 (diff)
net: core: netpoll: Enable netconsole IPv6 link local address
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/netpoll.c3
1 files changed, 2 insertions, 1 deletions
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;