Re: [PATCH v3] Fix dnsmasq/radvd on bridges not being able to be bound to IPv6 address on "recent" kernels

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

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]