diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-10-16 16:39:01 +0900 |
---|---|---|
committer | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-10-16 16:39:01 +0900 |
commit | 4c104a44c3bbf27661ba247d86a7c4bfa0cecba9 (patch) | |
tree | 5ae5bd5ab6cc748a512a0972db4c8ad73c4b9aea | |
parent | 2f84fb8c3624d2f86ebe97a76b4e2e202fc388ce (diff) |
gobgp: exclude 0.0.0.0 and ::
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
-rw-r--r-- | gobgp/cmd/global.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gobgp/cmd/global.go b/gobgp/cmd/global.go index 2db98a1a..72ca9b21 100644 --- a/gobgp/cmd/global.go +++ b/gobgp/cmd/global.go @@ -274,7 +274,7 @@ func ParseEvpnMacAdvArgs(args []string) (bgp.AddrPrefixInterface, []string, erro if err != nil { return nil, nil, fmt.Errorf("invalid mac: %s", args[0]) } - if args[1] != "0.0.0.0" || args[1] != "::" { + if args[1] != "0.0.0.0" && args[1] != "::" { ip = net.ParseIP(args[1]) if ip == nil { return nil, nil, fmt.Errorf("invalid ip prefix: %s", args[1]) @@ -326,7 +326,7 @@ func ParseEvpnMulticastArgs(args []string) (bgp.AddrPrefixInterface, []string, e var ip net.IP iplen := 0 - if args[0] != "0.0.0.0" || args[0] != "::" { + if args[0] != "0.0.0.0" && args[0] != "::" { ip = net.ParseIP(args[0]) if ip == nil { return nil, nil, fmt.Errorf("invalid ip prefix: %s", args[0]) |