mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
packet/bgp: Avoid colliding with module "net"
Signed-off-by: IWASE Yusuke <[email protected]>
This commit is contained in:
committed by
FUJITA Tomonori
parent
d79ac465c5
commit
1affc4c7be
+2
-2
@@ -2427,7 +2427,7 @@ func flowSpecPrefixParser(rf RouteFamily, args []string) (FlowSpecComponentInter
|
||||
return nil, fmt.Errorf("invalid flowspec dst/src prefix")
|
||||
}
|
||||
typ := args[0]
|
||||
ip, net, err := net.ParseCIDR(args[1])
|
||||
ip, nw, err := net.ParseCIDR(args[1])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid ip prefix")
|
||||
}
|
||||
@@ -2437,7 +2437,7 @@ func flowSpecPrefixParser(rf RouteFamily, args []string) (FlowSpecComponentInter
|
||||
} else if afi == AFI_IP6 && !strings.Contains(ip.String(), ":") {
|
||||
return nil, fmt.Errorf("invalid ipv6 prefix")
|
||||
}
|
||||
ones, _ := net.Mask.Size()
|
||||
ones, _ := nw.Mask.Size()
|
||||
var offset uint8
|
||||
if len(args) > 2 {
|
||||
o, err := strconv.Atoi(args[2])
|
||||
|
||||
Reference in New Issue
Block a user