mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
server: don't assume the existence of multiprotocol capability
Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
committed by
FUJITA Tomonori
parent
943e6adb3d
commit
af2703af93
+8
-3
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user