tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PATCH to mark IPv6 addresses DETACHED when down or link down
On Friday 19 August 2016 11:48:51 Matthew Mondor wrote:
> On Thu, 30 May 2013 14:02:50 +0100
> Roy Marples <roy%marples.name@localhost> wrote:
> > When a link status reports no carrier, or an interface is brought
> > down the state of all IPv6 addresses remains the same.
> > This means that when carrier is up or the interface is brought up no
> > duplicate address checking is performed.
>
> I've not checked yet if something similar was committed, but I noticed
> an issue on NetBSD-7 where if the ethernet link is down daemons are no
> longer able to bind to v6 interfaces (which are seen as detached via
> ifconfig). This appears to be a bug, because this used to work fine
> and still does on v4 addresses. It is problematic when booting up and
> the ethernet link is down, as daemons then need to be restarted.
As a side note to the below, the daemons will also bail when the address is
tentative, and regardless of our best intentions with waiting for DAD to
complete, the window of possibility is still there. It's equally possible that
the in-kernel RA handler could mark the address as detached regardless of link
state.
IPv4 addresses now share the same semantics in -current have have done for
some time. I also agree that something probably needs to be done to remedy
this.
There is also the long standing use case, but equally annoying, where you
cannot bind to an IP address which you know will exist but currently doesn't -
say for a PPPoE interface where you know you'll get a static IP. This is
highly annoying for say running a public facing DNS server like say nsd which
needs to bind to the IP on the PPPoE interface.
I need to write scripts to restart daemons when ppp comes up.
This is not nice, and is a bug as you point out.
Do any other OS's try to solve this problem?
Linux has IP_FREEBIND which allows you to bind to an address if it doesn't
exist or is tentative (they don't have the concept of DETACHED, but the same
logic could apply)
http://man7.org/linux/man-pages/man7/ip.7.html
FreeBSD has IP_BINDANY and IPV6_BINDANY which seems to do the same thing
https://www.freebsd.org/cgi/man.cgi?query=ip&apropos=0&sektion=4&manpath=FreeBSD+11-current&arch=default&format=html
There is also the easier approach of allowing bind(2) to use detached
addresses, but that doesn't help the PPPoE case or when the address is in the
tentative state.
Roy
Home |
Main Index |
Thread Index |
Old Index