diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-08-04 15:50:13 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-10-03 23:04:20 +0900 |
commit | 52a47a5fdcf7263a7b5b0a365f2491cac70014a5 (patch) | |
tree | 9f4b948938d0d0bb6b6e224cac4457cccf23fb4b /config/util.go | |
parent | 202beef425057b0231c45b0b2055ecd4ed503014 (diff) |
mrt: Enable to dump MRT with Path Identifier
This patch enables to dump updates and table in MRT format with Path
Identifier.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'config/util.go')
-rw-r--r-- | config/util.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/util.go b/config/util.go index f63e6d69..915b55b4 100644 --- a/config/util.go +++ b/config/util.go @@ -153,3 +153,12 @@ func ExtractNeighborAddress(c *Neighbor) (string, error) { } return addr, nil } + +func (n *Neighbor) IsAddPathReceiveEnabled(family bgp.RouteFamily) bool { + for _, af := range n.AfiSafis { + if af.State.Family == family { + return af.AddPaths.State.Receive + } + } + return false +} |