[libvirt] [PATCH v3] Fix dnsmasq/radvd on bridges not being able to be bound to IPv6 address on "recent" kernels
Eric Blake
eblake at redhat.com
Thu Sep 27 17:18:17 UTC 2012
On 09/26/2012 01:02 PM, Benjamin Cama wrote:
> Hi,
The subject line is a bit long (use 'git shortlog -30' to get an idea of
typical length), so I trimmed it to:
network: fix dnsmasq/radvd binding to IPv6 on recent kernels
>
> I hit this problem recently when trying to create a bridge with an IPv6
> address on a 3.2 kernel: dnsmasq (and, further, radvd) would not bind to
> the given address, waiting 20s and then giving up with -EADDRNOTAVAIL
> (resp. exiting immediately with "error parsing or activating the config
> file", without libvirt noticing it, BTW). This can be reproduced with (I
> think) any kernel >= 2.6.39 and the following XML (to be used with
> "virsh net-create"):
[snip; thanks again for the useful commit message]
> +++ b/src/network/bridge_driver.c
> @@ -2187,6 +2204,8 @@ networkStartNetworkVirtual(struct network_driver *driver,
> save_err = virSaveLastError();
>
> if (macTapIfName) {
> + if (tapfd >= 0)
> + VIR_FORCE_CLOSE(tapfd);
Useless if; VIR_FORCE_CLOSE(-1) is safe.
> +++ b/src/uml/uml_conf.c
> @@ -142,7 +142,8 @@ umlConnectTapDevice(virConnectPtr conn,
> vm->uuid, NULL,
> virDomainNetGetActualVirtPortProfile(net),
> virDomainNetGetActualVlan(net),
> - VIR_NETDEV_TAP_CREATE_IFUP) < 0) {
> + VIR_NETDEV_TAP_CREATE_IFUP
> + |VIR_NETDEV_TAP_CREATE_PERSIST) < 0) {
Formatting - we tend to prefer operators with spaces on both sides, and
line breaks after operators.
ACK with those changes, so I fixed it and pushed, along with your
.mailmap update.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120927/33040293/attachment-0001.sig>
More information about the libvir-list
mailing list