summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-07-01 04:43:46 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-06-30 05:02:52 +0900
commitd2a18c63837bfcf1182c55b7c6f1e1b4658487d0 (patch)
tree8be35b3baf08878fdb9c222e7ae41de14363e1d1 /packet/bgp
parent87e25c522e64076897d304ca93a2e6d217a26c37 (diff)
cli: support adding flowspec vpn routes
$ gobgp global rib add -a ipv4-l3vpn-flowspec rd 100:100 match destination 10.0.0.0/24 then discard Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'packet/bgp')
-rw-r--r--packet/bgp/bgp.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go
index 597307d8..2e4e7c4e 100644
--- a/packet/bgp/bgp.go
+++ b/packet/bgp/bgp.go
@@ -2190,21 +2190,21 @@ func flowSpecPrefixParser(rf RouteFamily, args []string) (FlowSpecComponentInter
switch typ {
case FlowSpecNameMap[FLOW_SPEC_TYPE_DST_PREFIX]:
switch rf {
- case RF_FS_IPv4_UC:
+ case RF_FS_IPv4_UC, RF_FS_IPv4_VPN:
return NewFlowSpecDestinationPrefix(NewIPAddrPrefix(uint8(ones), ip.String())), nil
- case RF_FS_IPv6_UC:
+ case RF_FS_IPv6_UC, RF_FS_IPv6_VPN:
return NewFlowSpecDestinationPrefix6(NewIPv6AddrPrefix(uint8(ones), ip.String()), offset), nil
default:
- return nil, fmt.Errorf("invalid type. only RF_FS_IPv4_UC or RF_FS_IPv6_UC is allowed")
+ return nil, fmt.Errorf("invalid type")
}
case FlowSpecNameMap[FLOW_SPEC_TYPE_SRC_PREFIX]:
switch rf {
- case RF_FS_IPv4_UC:
+ case RF_FS_IPv4_UC, RF_FS_IPv4_VPN:
return NewFlowSpecSourcePrefix(NewIPAddrPrefix(uint8(ones), ip.String())), nil
- case RF_FS_IPv6_UC:
+ case RF_FS_IPv6_UC, RF_FS_IPv6_VPN:
return NewFlowSpecSourcePrefix6(NewIPv6AddrPrefix(uint8(ones), ip.String()), offset), nil
default:
- return nil, fmt.Errorf("invalid type. only RF_FS_IPv4_UC or RF_FS_IPv6_UC is allowed")
+ return nil, fmt.Errorf("invalid type")
}
}
return nil, fmt.Errorf("invalid type. only destination or source is allowed")