lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #53803] nd6_cleanup_netif should set the auto-configur


From: David van Moolenbroek
Subject: [lwip-devel] [bug #53803] nd6_cleanup_netif should set the auto-configured address to invalid
Date: Sun, 17 Jun 2018 16:53:20 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #12, bug #53803 (project lwip):

Alright, I did a little experiment with a VirtualBox network and a MINIX node
in IPv6 router configuration (with net.inet6.ip6.forwarding set to '1') and
with rtadvd providing router announcements when desired, to test two operating
systems on the same virtual network: NetBSD and Linux.

NetBSD 7.1.2 (with net.inet6.ip6.accept_rtadv set to '1'): upon link down,
dynamic addresses get the status DETACHED (an extra, BSD-specific IPv6 address
state). Then, upon link up, after a short while those DETACHED addresses move
to state TENTATIVE and then PREFERRED. That happens regardless of whether
router advertisements arrive after the link-up event. In other words, NetBSD
will effectively keep using the dynamic addresses from before the link-down
event, with no further restriction, even if it is reconnected to another
network upon link-up. Indeed, the consequence is that that any TCP connections
stay alive as a result, but if the node was reconnected to a different
network, NetBSD risks that applications will use the older address as source
address, even if there is also a newer address, until its PREFERRED status
expires. The same behavior applies to the case that the interface is set
down/up administratively.

Linux 4.17.1-1.el7 (from ELRepo, on Centos 7 [1804]): upon link down, dynamic
addresses are completely deleted. Then, upon link up, they will be recreated
only as a result of router announcements. However, TCP connections are still
kept alive during such a window, and (only) once a router announcement
restores the previous dynamic address, the TCP connection will resume
communication. Again, the same exact behavior is observed upon admin-down/up.

I think the preliminary takeaways from this limited test are that 1) in
effect, keeping TCP connections alive across link failures is common and
should be a consideration in any solution, and 2) there is very little
consistency to be expected between TCP/IP stacks otherwise, and so lwIP can
take its own decisions here.

In that light, I do think that my suggestion in comment #8 combines the best
of both worlds: it would keep the addresses and thus TCP connections alive,
and it would respond to network changes better than NetBSD does right now. An
alternative would be to make an exception in the TCP module for
auto-configured addresses, as is apparently already the case for IPv4 auto-IP
anyway. In that case, dynamic IPv6 addresses can simply be removed as
originally suggested, and the resulting behavior will be more like Linux.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?53803>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]