Re: ipv6 loopback
On Wed, 2020-06-10 at 12:01 -0500, David Wright wrote:
> On Wed 10 Jun 2020 at 12:05:57 (-0400), Jim Popovitch wrote:
> > Something that has always bugged me (and #debian hasn't yet answered)
> > What establishes the IPv6 loopback ::1 address, and why is there no need
> > for "iface lo inet6 loopback" in /etc/network/interfaces?
> AFAICT there's code in linux-source-4.19/net/ipv6/addrconf.c to make
> sure that the loopback gets set up early enough. The comments are:
> /* The addrconf netdev notifier requires that loopback_dev
> * has it's ipv6 private information allocated and setup
> * before it can bring up and give link-local addresses
> * to other devices which are up.
> * Unfortunately, loopback_dev is not necessarily the first
> * entry in the global dev_base list of net devices. In fact,
> * it is likely to be the very last entry on that list.
> * So this causes the notifier registry below to try and
> * give link-local addresses to all devices besides loopback_dev
> * first, then loopback_dev, which cases all the non-loopback_dev
> * devices to fail to get a link-local address.
> * So, as a temporary fix, allocate the ipv6 structure for
> * loopback_dev first by hand.
> * Longer term, all of the dependencies ipv6 has upon the loopback
> * device and it being up should be removed.
Ahh, thanks for that.