mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-02 03:11:12 +00:00
20718b8bcb
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).
22 lines
305 B
Plaintext
22 lines
305 B
Plaintext
#
|
|
# These symbols are dependent upon --with-qemu or --with-lxc via
|
|
# WITH_BRIDGE.
|
|
#
|
|
|
|
|
|
# bridge.h
|
|
brAddBridge;
|
|
brAddInetAddress;
|
|
brAddInterface;
|
|
brAddTap;
|
|
brDeleteTap;
|
|
brDeleteBridge;
|
|
brDelInetAddress;
|
|
brHasBridge;
|
|
brInit;
|
|
brSetEnableSTP;
|
|
brSetForwardDelay;
|
|
brSetInetNetmask;
|
|
brSetInterfaceUp;
|
|
brShutdown;
|