]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
network: wait for DAD to finish for bridge IPv6 addresses
authorMaxim Perevedentsev <mperevedentsev@virtuozzo.com>
Tue, 20 Oct 2015 15:44:18 +0000 (18:44 +0300)
committerLaine Stump <laine@laine.org>
Thu, 29 Oct 2015 01:48:04 +0000 (21:48 -0400)
commit0f7436ca54c9db2d5460bd54e7613f64f4727102
tree77a68b67fed5126cde909c618004178d7c12e35d
parent131e7245a8336541ee61047eac8ecb447129b963
network: wait for DAD to finish for bridge IPv6 addresses

commit db488c79 assumed that dnsmasq would complete IPv6 DAD before
daemonizing, but in reality it doesn't wait, which creates problems
when libvirt's bridge driver sets the matching "dummy tap device" to
IFF_DOWN prior to DAD completing.

This patch waits for DAD completion by periodically polling the kernel
using netlink to check whether there are any IPv6 addresses assigned
to bridge which have a 'tentative' state (if there are any in this
state, then DAD hasn't yet finished). After DAD is finished, execution
continues. To avoid an endless hang in case something was wrong with
the kernel's DAD, we wait a maximum of 5 seconds.
src/libvirt_private.syms
src/network/bridge_driver.c
src/util/virnetdev.c
src/util/virnetdev.h