Skip to content

Commit

Permalink
FEA/rtmv2: Fix XLOG_ASSERT if vifp is not found.
Browse files Browse the repository at this point in the history
There is no need to assert if we try to remove something that
is already gone.

Signed-off-by: Victor Miasnikov <vvm@tut.by>
  • Loading branch information
VictorMiasnikov authored and greearb committed Mar 21, 2012
1 parent 24373f8 commit 1ac240c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xorp/fea/data_plane/fibconfig/fibconfig_entry_set_rtmv2.cc
Expand Up @@ -344,6 +344,13 @@ FibConfigEntrySetRtmV2::delete_entry(const FteX& fte)
// Copy the interface index.
const IfTree& iftree = fibconfig().merged_config_iftree();
const IfTreeVif* vifp = iftree.find_vif(fte.ifname(), fte.vifname());
if (!vifp) {
// Maybe VIF is already deleted or we are not configured to use it.
XLOG_WARNING("Trying to delete route for iface: %s on tree: %s, but cannot find iface. Will continue.\n",
fte.ifname().c_str(), iftree.getName().c_str());
return XORP_OK;
}

XLOG_ASSERT(vifp != NULL);
rtm->rtm_index = vifp->pif_index();

Expand Down

0 comments on commit 1ac240c

Please sign in to comment.