summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/fsm.go')
-rw-r--r--server/fsm.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 93fa457a..d853592d 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -581,10 +581,15 @@ func open2Cap(open *bgp.BGPOpen, n *config.Neighbor) (map[bgp.BGPCapabilityCode]
}
}
- for rf, _ := range rfMap {
- if _, y := r[rf]; !y {
- delete(rfMap, rf)
+ if len(r) > 0 {
+ for rf, _ := range rfMap {
+ if _, y := r[rf]; !y {
+ delete(rfMap, rf)
+ }
}
+ } else {
+ rfMap = make(map[bgp.RouteFamily]bool)
+ rfMap[bgp.RF_IPv4_UC] = true
}
return capMap, rfMap
}