• L
    Replace brSetInetAddress/brSetInetNetmask with brAddInetAddress · 20718b8b
    Laine Stump 提交于
    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).
    20718b8b
bridge.c 18.7 KB