diff --git a/libnetwork/endpoint_info.go b/libnetwork/endpoint_info.go index edc813aa90..fde155088d 100644 --- a/libnetwork/endpoint_info.go +++ b/libnetwork/endpoint_info.go @@ -272,12 +272,7 @@ func (epi *EndpointInterface) SetNames(srcName string, dstPrefix string) error { func (ep *Endpoint) InterfaceName() driverapi.InterfaceNameInfo { ep.mu.Lock() defer ep.mu.Unlock() - - if ep.iface != nil { - return ep.iface - } - - return nil + return ep.iface } // AddStaticRoute adds a route to the sandbox.