]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: addrconf: fix generation of new temporary addresses
authorMarcus Huewe <suse-tux@gmx.de>
Mon, 6 Feb 2017 17:34:56 +0000 (18:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Feb 2017 16:54:40 +0000 (11:54 -0500)
commit8f24ce039c9d0149aa1367055bc4ae76461f864f
treefe6133efabecfb467bda70d77607ca29492a5537
parent4d8afbf9e345eb65452c41c98cc59b5563cb3e88
ipv6: addrconf: fix generation of new temporary addresses

Under some circumstances it is possible that no new temporary addresses
will be generated.

For instance, addrconf_prefix_rcv_add_addr() indirectly calls
ipv6_create_tempaddr(), which creates a tentative temporary address and
starts dad. Next, addrconf_prefix_rcv_add_addr() indirectly calls
addrconf_verify_rtnl(). Now, assume that the previously created temporary
address has the least preferred lifetime among all existing addresses and
is still tentative (that is, dad is still running). Hence, the next run of
addrconf_verify_rtnl() is performed when the preferred lifetime of the
temporary address ends. If dad succeeds before the next run, the temporary
address becomes deprecated during the next run, but no new temporary
address is generated.

In order to fix this, schedule the next addrconf_verify_rtnl() run slightly
before the temporary address becomes deprecated, if dad succeeded.

Signed-off-by: Marcus Huewe <suse-tux@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c