It still did not apply with 'git am'.  I had to edit it to remove the
character in front of 'From' at the beginning of the patch.

I also fixed up the title and comments.

See the attached patch as an example of what I consider good
title and comment section for a patch.

The fixed-up patch has been applied and will be pushed shortly.

Thanks,
Ben

--
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com

>From fad792992b2edc3896808250835445d7a124160a Mon Sep 17 00:00:00 2001
From: Victor Miasnikov <[email protected]>
Date: Wed, 21 Mar 2012 18:53:41 +0300
Subject: [PATCH] FEA/rtmv2: Fix XLOG_ASSERT if vifp is not found.

There is no need to assert if we try to remove something that
is already gone.

Signed-off-by: Victor Miasnikov <[email protected]>
---
 .../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

_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to