diff --git a/libnetwork/drivers/bridge/errors.go b/libnetwork/drivers/bridge/errors.go index d34e20e24d..8757add165 100644 --- a/libnetwork/drivers/bridge/errors.go +++ b/libnetwork/drivers/bridge/errors.go @@ -209,16 +209,6 @@ func (fcv6 *FixedCIDRv6Error) Error() string { // InternalError denotes the type of this error func (fcv6 *FixedCIDRv6Error) InternalError() {} -// InvalidIPTablesCfgError is returned when an invalid ip tables configuration is entered -type InvalidIPTablesCfgError string - -func (action InvalidIPTablesCfgError) Error() string { - return fmt.Sprintf("Invalid IPTables action '%s'", string(action)) -} - -// Internal denotes the type of this error -func (action InvalidIPTablesCfgError) Internal() {} - // IPv4AddrAddError is returned when IPv4 address could not be added to the bridge. type IPv4AddrAddError struct { IP *net.IPNet diff --git a/libnetwork/drivers/bridge/link.go b/libnetwork/drivers/bridge/link.go index 9849afbe7e..1670e750fb 100644 --- a/libnetwork/drivers/bridge/link.go +++ b/libnetwork/drivers/bridge/link.go @@ -63,7 +63,7 @@ func linkContainers(action, parentIP, childIP string, ports []types.TransportPor case "-D": nfAction = iptables.Delete default: - return InvalidIPTablesCfgError(action) + return fmt.Errorf("invalid iptables action: %s", action) } ip1 := net.ParseIP(parentIP)