]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Replace brSetInetAddress/brSetInetNetmask with brAddInetAddress
authorLaine Stump <laine@laine.org>
Tue, 14 Dec 2010 17:14:39 +0000 (12:14 -0500)
committerLaine Stump <laine@laine.org>
Thu, 23 Dec 2010 20:53:26 +0000 (15:53 -0500)
commit20718b8bcbb0c1a15ca96083d2636a2445dde291
tree249ec9ff9c31677e90593972622d9bbfad3b1dd5
parent4713f074a5208599c1d1733c058e18c850527022
Replace brSetInetAddress/brSetInetNetmask with brAddInetAddress

brSetInetAddress can only set a single IP address on the bridge, and
uses a method (ioctl(SIOCSETIFADDR)) that only works for IPv4. Replace
it and brSetInetNetmask with a single function that uses the external
"ip addr add" command to add an address/prefix to the interface - this
supports IPv6, and allows adding multiple addresses to the interface.

Although it isn't currently used in the code, we also add a
brDelInetAddress for completeness' sake.

Also, while we're modifying bridge.c, we change brSetForwardDelay and
brSetEnableSTP to use the new virCommand API rather than the
deprecated virRun, and also log an error message in bridge_driver.c if
either of those fail (previously the failure would be completely
silent).
configure.ac
src/libvirt_bridge.syms
src/network/bridge_driver.c
src/util/bridge.c
src/util/bridge.h