]> xenbits.xensource.com Git - libvirt.git/commit
util: fix missing broadcast address in bridge and tap device IP addresses
authorLaine Stump <laine@laine.org>
Thu, 16 Jun 2016 17:03:00 +0000 (13:03 -0400)
committerLaine Stump <laine@laine.org>
Thu, 16 Jun 2016 18:27:40 +0000 (14:27 -0400)
commitbf913385ae0a3671cb729010a1aa4ec3e700d7bb
tree98f4b91192cffdadf67332742b44ba61cd506035
parentd5fb8f4564aa68ec78cc5c784bd8c6eb01a3744d
util: fix missing broadcast address in bridge and tap device IP addresses

Commit b3d069872ce53eb added peer address setting to the low level
virNetDevSetIPAddress() function, but ended up causing a segfault in
cases where the caller passed NULL for peer address.

Commit a3510e33d33e52c fixed the segfault, but managed to cause us to
skip setting the broadcast address when setting an interface's IP
address. The result is that the broadcast address is 0.0.0.0 for all
libvirt-created bridges (and interfaces in lxc containers with IP
addresses set by libvirt).

This was reported on the mailing list:

  https://www.redhat.com/archives/libvir-list/2016-June/msg00027.html

but I was too busy to investigate at the time. I found it by accident
today while refactoring virNetDevSetIPAddress(). Since this regression
is present in the 1.3.5 release, I'm sending the bugfix as a separate
patch from my larger refactoring patchset.
src/util/virnetdev.c