Przeglądaj źródła

Manually bring up the host side veth interface

In preparation for the new update of vishvananda/netlink package
we need to bringup the host veth interface manually.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Jana Radhakrishnan 10 lat temu
rodzic
commit
10444cb448
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      libnetwork/drivers/bridge/bridge.go

+ 5 - 0
libnetwork/drivers/bridge/bridge.go

@@ -926,6 +926,11 @@ func (d *driver) CreateEndpoint(nid, eid types.UUID, epInfo driverapi.EndpointIn
 	}
 	}
 	endpoint.macAddress = mac
 	endpoint.macAddress = mac
 
 
+	// Up the host interface after finishing all netlink configuration
+	if err := netlink.LinkSetUp(host); err != nil {
+		return fmt.Errorf("could not set link up for host interface %s: %v", hostIfName, err)
+	}
+
 	// v6 address for the sandbox side pipe interface
 	// v6 address for the sandbox side pipe interface
 	ipv6Addr = &net.IPNet{}
 	ipv6Addr = &net.IPNet{}
 	if config.EnableIPv6 {
 	if config.EnableIPv6 {