diff options
author | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2017-09-22 11:24:51 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-11-07 21:53:46 +0900 |
commit | 88defeba0f13bde7ab3de37047a95f5a611306a9 (patch) | |
tree | f9d5908048722f5ec5d3349dcf14acb9dcf4dcff /table | |
parent | 9e584acea92ba17a6792d4724efad0e51c118768 (diff) |
table/path: Print Confederation AS_PATH segment Explicitly
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'table')
-rw-r--r-- | table/path.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/table/path.go b/table/path.go index d6f6e217..875fd04e 100644 --- a/table/path.go +++ b/table/path.go @@ -665,7 +665,12 @@ func (path *Path) GetAsString() string { sep := " " switch segment.Type { - case bgp.BGP_ASPATH_ATTR_TYPE_SET, bgp.BGP_ASPATH_ATTR_TYPE_CONFED_SET: + case bgp.BGP_ASPATH_ATTR_TYPE_CONFED_SEQ: + s.WriteString("(") + case bgp.BGP_ASPATH_ATTR_TYPE_CONFED_SET: + s.WriteString("[") + sep = "," + case bgp.BGP_ASPATH_ATTR_TYPE_SET: s.WriteString("{") sep = "," } @@ -676,7 +681,11 @@ func (path *Path) GetAsString() string { } } switch segment.Type { - case bgp.BGP_ASPATH_ATTR_TYPE_SET, bgp.BGP_ASPATH_ATTR_TYPE_CONFED_SET: + case bgp.BGP_ASPATH_ATTR_TYPE_CONFED_SEQ: + s.WriteString(")") + case bgp.BGP_ASPATH_ATTR_TYPE_CONFED_SET: + s.WriteString("]") + case bgp.BGP_ASPATH_ATTR_TYPE_SET: s.WriteString("}") } } |