Skip to content

Commit

Permalink
OVSDB fix exporting routes for existing VRF
Browse files Browse the repository at this point in the history
Issue:
------
if client comes after vrf is available it fails to export route
table till further change happens on vrf entry.

Fix:
----
start walk on vrf table in VrfOvsdbObject Constructor to iterate
through existing VRF entries and export them

Change-Id: I392395a719ceeb8381fa46f478cf74f7d7560492
Closes-Bug: 1420130
  • Loading branch information
Prabhjot Singh Sethi committed Feb 10, 2015
1 parent 975745e commit ab8e13b
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,13 @@ VrfOvsdbObject::VrfOvsdbObject(OvsdbClientIdl *idl, DBTable *table) :
walkid_(DBTableWalker::kInvalidWalkerId) {
vrf_listener_id_ = table->Register(boost::bind(&VrfOvsdbObject::VrfNotify,
this, _1, _2));

// Trigger Walk to get existing vrf entries.
DBTableWalker *walker = idl->agent()->db()->GetWalker();
walkid_ = walker->WalkTable(table_, NULL,
boost::bind(&VrfOvsdbObject::VrfWalkNotify, this, _1, _2),
boost::bind(&VrfOvsdbObject::VrfWalkDone, this, _1));

client_idl_->Register(OvsdbClientIdl::OVSDB_UCAST_MAC_REMOTE,
boost::bind(&VrfOvsdbObject::OvsdbRouteNotify, this, _1, _2));
}
Expand Down

0 comments on commit ab8e13b

Please sign in to comment.