Skip to content

Commit

Permalink
[Vnet] Set BFD multihop to true for Vnet routes (#2244)
Browse files Browse the repository at this point in the history
* Set BFD multihop to true for Vnet routes
  • Loading branch information
prsunny authored May 4, 2022
1 parent 39e8996 commit 4e53afc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions orchagent/vnetorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_vnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e53afc

Please sign in to comment.