If an interface is removed from the system, then you can no longer remove
it from xorp igmp configuration because the commit will fail (due to
lack of vif).  This is a race of some sort or another, and was fairly difficult
to reproduce even on our setup.

Here's the fix:

*  Don't fail vif_stop in Mld6igmpNode::stop_vif if the interface is already 
removed.
   Log the inconsistency, but return XORP_OK so the commit can continue.
   This is similar to code I've had in 'mfea_node' for several years.

Thanks,
Ben

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

diff --git a/fea/mfea_node.cc b/fea/mfea_node.cc
index 454e683..3500b93 100644
--- a/fea/mfea_node.cc
+++ b/fea/mfea_node.cc
@@ -1214,9 +1214,9 @@ MfeaNode::stop_vif(const string& vif_name, string& 
error_msg)
 {
     MfeaVif *mfea_vif = vif_find_by_name(vif_name);
     if (mfea_vif == NULL) {
-       error_msg = c_format("Cannot stop vif %s: no such vif",
+       error_msg = c_format("Cannot stop vif %s: no such vif  (will continue)",
                             vif_name.c_str());
-       XLOG_ERROR("%s", error_msg.c_str());
+       XLOG_WARNING("%s", error_msg.c_str());
        // If it doesn't exist, it's as stopped as it's going to get.  Returning
        // error will cause entire commit to fail.
        //return (XORP_ERROR);
diff --git a/mld6igmp/mld6igmp_node.cc b/mld6igmp/mld6igmp_node.cc
index 0baddaf..d3c85f0 100644
--- a/mld6igmp/mld6igmp_node.cc
+++ b/mld6igmp/mld6igmp_node.cc
@@ -1114,10 +1114,12 @@ Mld6igmpNode::stop_vif(const string& vif_name, string& 
error_msg)
 {
     Mld6igmpVif *mld6igmp_vif = vif_find_by_name(vif_name);
     if (mld6igmp_vif == NULL) {
-       error_msg = c_format("Cannot stop vif %s: no such vif",
+       error_msg = c_format("Cannot stop vif %s: no such vif (will continue)",
                             vif_name.c_str());
-       XLOG_ERROR("%s", error_msg.c_str());
-       return (XORP_ERROR);
+       XLOG_WARNING("%s", error_msg.c_str());
+       // VIF is gone, it's as stopped as it will get.  Returning error will 
cause entire
+       // commit to fail.
+       return XORP_OK;
     }
     
     if (mld6igmp_vif->stop(error_msg) != XORP_OK) {
_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to