diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-01-06 13:43:04 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-01-16 05:06:03 -0800 |
commit | 1affc4c7bee7430edd82b36dc0bfe139aefd3e6d (patch) | |
tree | e591e2b44741662e38c785763b8e73c837215dbc /packet/bgp | |
parent | d79ac465c5ac932400deddb998ff71372dcc8ccf (diff) |
packet/bgp: Avoid colliding with module "net"
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'packet/bgp')
-rw-r--r-- | packet/bgp/bgp.go | 4 |
1 files changed, 2 insertions, 2 deletions
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]) |