From 52273ebc1a8bd46492f20f1535e60d6144df2bb2 Mon Sep 17 00:00:00 2001 From: Manish Date: Tue, 21 Feb 2017 07:18:04 +0530 Subject: [PATCH] Dont use link local flag in bgp-aas flow encode. Presence of BGP service flag is indication of bgp-aas flows. Link local is not needed to identify candidate for relaxed policy. Bgp flags also indicates relaxed policy on fabric. Presence of this flag used to cause port to be freed on flow delete even though there will be a second flow using this port. Vrouter uses link local flag to release port. Removing this flag ensures that vrouter deos not release the port used in bgp-aas. In case flow is not present and port is still part of relaxed policy then packet will be sent to host, hence achieving the functionailty when port would have been released. Change-Id: Id6cfd2d0b0ff3dc0724715bc126ccee882068486 Closes-bug: #1664301 (cherry picked from commit e7f8716ba29f709021e4f74c34ddc54801037700) --- src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc b/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc index 46996179c1e..a9d8d46caeb 100644 --- a/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc +++ b/src/vnsw/agent/vrouter/ksync/flowtable_ksync.cc @@ -328,13 +328,14 @@ int FlowTableKSyncEntry::Encode(sandesh_op::type op, char *buf, int buf_len) { } } - //TODO Seperate flags for BgpRouterService?? - if (nat_flow->is_flags_set(FlowEntry::LinkLocalBindLocalSrcPort) || - nat_flow->is_flags_set(FlowEntry::BgpRouterService)) { + //Link local, flag determines relaxed policy + if (nat_flow->is_flags_set(FlowEntry::LinkLocalBindLocalSrcPort)) { flags |= VR_FLOW_FLAG_LINK_LOCAL; - if (nat_flow->is_flags_set(FlowEntry::BgpRouterService)) { - flags |= VR_FLOW_BGP_SERVICE; - } + } + + //Bgp service, flag determines relaxed policy + if (nat_flow->is_flags_set(FlowEntry::BgpRouterService)) { + flags |= VR_FLOW_BGP_SERVICE; } flags |= VR_FLOW_FLAG_VRFT;