From: David Ahern Subject: Re: [PATCH v2 net-next] net: ipv6: put host and anycast routes on device with address Date: Fri, 18 Aug 2017 18:05:56 -0600 Message-ID: <75e79efe-4a41-7b15-b7bb-8ed0624b72b5@gmail.com> References: <1502997440-32334-1-git-send-email-dsahern@gmail.com> <87wp60lb70.fsf@stressinduktion.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, yoshfuji@linux-ipv6.org To: Hannes Frederic Sowa Return-path: Received: from mail-pg0-f66.google.com ([74.125.83.66]:34357 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbdHSAGC (ORCPT ); Fri, 18 Aug 2017 20:06:02 -0400 Received: by mail-pg0-f66.google.com with SMTP id i12so1852663pgr.1 for ; Fri, 18 Aug 2017 17:06:02 -0700 (PDT) In-Reply-To: <87wp60lb70.fsf@stressinduktion.org> Sender: netdev-owner@vger.kernel.org List-ID: On 8/18/17 5:15 PM, Hannes Frederic Sowa wrote: > Hello David, > > David Ahern writes: > >> @@ -2688,15 +2716,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, >> { >> u32 tb_id; >> struct net *net = dev_net(idev->dev); >> - struct net_device *dev = net->loopback_dev; >> + struct net_device *dev = idev->dev; >> struct rt6_info *rt; >> >> - /* use L3 Master device as loopback for host routes if device >> - * is enslaved and address is not link local or multicast >> - */ >> - if (!rt6_need_strict(addr)) >> - dev = l3mdev_master_dev_rcu(idev->dev) ? : dev; >> - >> rt = ip6_dst_alloc(net, dev, DST_NOCOUNT); >> if (!rt) >> return ERR_PTR(-ENOMEM); > > I am afraid this change might break Java: > > > > I am all in for this change, but maybe it might be necessary to mask > RTF_LOCAL routes with "lo" somehow. That's asinine. The if_inet6 processing is just getting the 'lo' interface index. Why scan the file looking for that? The ipv6_route processing is assembling routes against the loopback device regardless of what the route is. Do you know why - what the route list is used for? If it matters, we could keep 'lo' as the device for RTF_LOCAL routes in the proc files to keep backwards compatibility.