Skip to content

Commit

Permalink
Fix circular route re-origination bug with transit VN
Browse files Browse the repository at this point in the history
Problem:

When a service is applied between a VN and a transit VN, routes from the
VN that are re-originated into the transit VN as ServiceChain routes get
re-originated again as ServiceChain routes into the regular VN.

Cause:

Implementation prior to transit VN used to ignore routes that did belong
to the destination VN of the service chain.  Code changes for transit VN
functionality relaxed this check, but did not cover the case where route
belongs to the source VN.

Fix:

Add check to ignore routes from source VN.

Change-Id: Ic6f5520217eca64b79f5144d71f80aa6d661e48a
Partial-Bug: 1365277
  • Loading branch information
Nischal Sheth committed Oct 16, 2014
1 parent 05bfe8c commit 7b102a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bgp/routing-instance/service_chaining.cc
Expand Up @@ -131,8 +131,11 @@ bool ServiceChain::Match(BgpServer *server, BgpTable *table,
deleted = true;

int vn_index = GetOriginVnIndex(route);
int src_vn_index = src_->virtual_network_index();
int dest_vn_index = dest_->virtual_network_index();
if (!vn_index || dest_vn_index != vn_index) {
if (src_vn_index == vn_index)
deleted = true;
if (!dest_->virtual_network_allow_transit())
deleted = true;
if (!dest_vn_index)
Expand Down

0 comments on commit 7b102a5

Please sign in to comment.