summaryrefslogtreecommitdiffhomepage
path: root/config/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'config/util.go')
-rw-r--r--config/util.go9
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
+}