summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-05-11 23:29:14 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-05-11 23:31:49 +0900
commitc5fdcad5727dee2411b5e4ad33fd249d3100880d (patch)
tree4f8d91cdae7be54280f3f02425acaa90e568623c /server
parent40eadd4a8e682379e4e2554ac3ae5ef140c2ae81 (diff)
fix add-path with vrf-neighbor
close #1661 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/server.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go
index 251ce7cb..df0306b4 100644
--- a/server/server.go
+++ b/server/server.go
@@ -976,7 +976,18 @@ func (server *BgpServer) propagateUpdateToNeighbors(source *Peer, newPath *table
if (source == nil && targetPeer.isRouteServerClient()) || (source != nil && source.isRouteServerClient() != targetPeer.isRouteServerClient()) {
continue
}
- if targetPeer.isAddPathSendEnabled(family) {
+ f := func() bgp.RouteFamily {
+ if targetPeer.fsm.pConf.Config.Vrf != "" {
+ switch family {
+ case bgp.RF_IPv4_VPN:
+ return bgp.RF_IPv4_UC
+ case bgp.RF_IPv6_VPN:
+ return bgp.RF_IPv6_UC
+ }
+ }
+ return family
+ }()
+ if targetPeer.isAddPathSendEnabled(f) {
bestList = []*table.Path{newPath}
oldList = nil
} else if targetPeer.isRouteServerClient() {