summaryrefslogtreecommitdiffhomepage
path: root/server/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/peer.go')
-rw-r--r--server/peer.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go
index 80fc6a1b..13238e54 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -182,6 +182,14 @@ func (peer *Peer) configuredRFlist() []bgp.RouteFamily {
return rfs
}
+func (peer *Peer) negotiatedRFList() []bgp.RouteFamily {
+ l := make([]bgp.RouteFamily, 0, len(peer.fsm.rfMap))
+ for family, _ := range peer.fsm.rfMap {
+ l = append(l, family)
+ }
+ return l
+}
+
func (peer *Peer) toGlobalFamilies(families []bgp.RouteFamily) []bgp.RouteFamily {
if peer.fsm.pConf.Config.Vrf != "" {
fs := make([]bgp.RouteFamily, 0, len(families))