mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
libnetwork/drivers/bridge: remove ErrNoIPAddr
It's a generic error, doesn't implement an errdefs type, and not used as sentinel error anywhere. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -7,13 +7,6 @@ import (
|
||||
"net"
|
||||
)
|
||||
|
||||
// ErrNoIPAddr error is returned when bridge has no IPv4 address configured.
|
||||
type ErrNoIPAddr struct{}
|
||||
|
||||
func (enip *ErrNoIPAddr) Error() string {
|
||||
return "bridge has no IPv4 address configured"
|
||||
}
|
||||
|
||||
// ErrInvalidGateway is returned when the user provided default gateway (v4/v6) is not valid.
|
||||
type ErrInvalidGateway struct{}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package bridge
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
@@ -21,7 +22,7 @@ func setupVerifyAndReconcileIPv4(config *networkConfiguration, i *bridgeInterfac
|
||||
|
||||
// Verify that the bridge has an IPv4 address.
|
||||
if addrv4.IPNet == nil {
|
||||
return &ErrNoIPAddr{}
|
||||
return errors.New("bridge has no IPv4 address configured")
|
||||
}
|
||||
|
||||
// Verify that the bridge IPv4 address matches the requested configuration.
|
||||
|
||||
Reference in New Issue
Block a user