From 1affc4c7bee7430edd82b36dc0bfe139aefd3e6d Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Fri, 6 Jan 2017 13:43:04 +0900 Subject: packet/bgp: Avoid colliding with module "net" Signed-off-by: IWASE Yusuke --- packet/bgp/bgp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packet/bgp') diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go index 5a2befa1..f0f7b2ce 100644 --- a/packet/bgp/bgp.go +++ b/packet/bgp/bgp.go @@ -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]) -- cgit v1.2.3