summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-02-24 04:31:21 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-02-24 04:31:21 -0800
commitb387a7b29c3c819062402b4298aa5fd446ba8653 (patch)
tree9d5671e2990a76b5695a3977f4aedb9a34bdebbc /table
parent00a592ef3a852c7fe5ac0c1ccac1f0c7345e5537 (diff)
cli: sort Flowspec components
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table')
-rw-r--r--table/path.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/table/path.go b/table/path.go
index 6c8ba87a..e54b9a03 100644
--- a/table/path.go
+++ b/table/path.go
@@ -60,17 +60,17 @@ type originInfo struct {
stale bool
}
-type components []bgp.FlowSpecComponentInterface
+type FlowSpecComponents []bgp.FlowSpecComponentInterface
-func (c components) Len() int {
+func (c FlowSpecComponents) Len() int {
return len(c)
}
-func (c components) Swap(i, j int) {
+func (c FlowSpecComponents) Swap(i, j int) {
c[i], c[j] = c[j], c[i]
}
-func (c components) Less(i, j int) bool {
+func (c FlowSpecComponents) Less(i, j int) bool {
return c[i].Type() < c[j].Type()
}
@@ -95,7 +95,7 @@ func NewPath(source *PeerInfo, nlri bgp.AddrPrefixInterface, isWithdraw bool, pa
}
if nlri != nil && (nlri.SAFI() == bgp.SAFI_FLOW_SPEC_UNICAST || nlri.SAFI() == bgp.SAFI_FLOW_SPEC_VPN) {
- var coms components
+ var coms FlowSpecComponents
var f *bgp.FlowSpecNLRI
switch nlri.(type) {
case *bgp.FlowSpecIPv4Unicast: