[Xorp-hackers] [PATCH] FEA fibconfig_entry_set_rtmv2.cc delete_entry XLOG_WARNING {-- XLOG_ASSERT(vifp != NULL);
Victor Miasnikov
vvm at tut.by
Mon Mar 19 04:11:32 PDT 2012
From: Victor Miasnikov <vvm at tut.by>
FEA fibconfig_entry_set_rtmv2.cc delete_entry XLOG_WARNING {-- XLOG_ASSERT(vifp != NULL);
No XLOG_ASSERT when "delete route for iface" , but XLOG_WARNING a-la fibconfig_entry_set_iphelper.cc
for prevent:
==
[ 2012/3/19 6:48:11.708000 FATAL ..\lib\xorp\sbin\xorp_fea.exe:304 FEA
fea/data_plane/fibconfig/fibconfig_entry_set_rtmv2.cc:347 delete_entry ] vifp != NULL
Assertion failed: 0, file fea/data_plane/fibconfig/fibconfig_entry_set_rtmv2.cc, line 347
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
==
Signed-off-by: Victor Miasnikov <vvm at tut.by>
---
.../fibconfig/fibconfig_entry_set_rtmv2.cc | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/xorp/fea/data_plane/fibconfig/fibconfig_entry_set_rtmv2.cc
b/xorp/fea/data_plane/fibconfig/fibconfig_entry_set_rtmv2.cc
index f24e8a4..432a8fe 100644
--- a/xorp/fea/data_plane/fibconfig/fibconfig_entry_set_rtmv2.cc
+++ b/xorp/fea/data_plane/fibconfig/fibconfig_entry_set_rtmv2.cc
@@ -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();
--
1.7.9.msysgit.0
More information about the Xorp-hackers
mailing list