From 4e53afc1ceef1a1fea8db32689c20e6e6d6f34e4 Mon Sep 17 00:00:00 2001 From: Prince Sunny Date: Wed, 4 May 2022 15:28:56 -0700 Subject: [PATCH] [Vnet] Set BFD multihop to true for Vnet routes (#2244) * Set BFD multihop to true for Vnet routes --- orchagent/vnetorch.cpp | 2 ++ tests/test_vnet.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/orchagent/vnetorch.cpp b/orchagent/vnetorch.cpp index 5f51de167dc2..45ba120ee632 100644 --- a/orchagent/vnetorch.cpp +++ b/orchagent/vnetorch.cpp @@ -1539,6 +1539,8 @@ void VNetRouteOrch::createBfdSession(const string& vnet, const NextHopKey& endpo FieldValueTuple fvTuple("local_addr", src_ip.to_string()); data.push_back(fvTuple); + data.emplace_back("multihop", "true"); + bfd_session_producer_.set(key, data); bfd_sessions_[monitor_addr].bfd_state = SAI_BFD_SESSION_STATE_DOWN; diff --git a/tests/test_vnet.py b/tests/test_vnet.py index 39cb648c8cd9..60a2ed8c33ff 100644 --- a/tests/test_vnet.py +++ b/tests/test_vnet.py @@ -450,7 +450,7 @@ def get_bfd_session_id(dvs, addr): status, fvs = tbl.get(entry) fvs = dict(fvs) assert status, "Got an error when get a key" - if fvs["SAI_BFD_SESSION_ATTR_DST_IP_ADDRESS"] == addr: + if fvs["SAI_BFD_SESSION_ATTR_DST_IP_ADDRESS"] == addr and fvs["SAI_BFD_SESSION_ATTR_MULTIHOP"] == "true": return entry return None