This patch fixes a bug where a commit can fail if the multicast addresses trying to be removed are already gone (probably because an entire network device disappeared shortly ago). If it's already gone, log a warning, but don't fail the commit.

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


diff --git a/fea/io_ip_manager.cc b/fea/io_ip_manager.cc
index 3c90a33..430e6d2 100644
--- a/fea/io_ip_manager.cc
+++ b/fea/io_ip_manager.cc
@@ -534,7 +534,10 @@ IoIpComm::leave_multicast_group(const string&	if_name,
 			     group_address.str().c_str(),
 			     if_name.c_str(),
 			     vif_name.c_str());
-	return (XORP_ERROR);
+	XLOG_WARNING("%s", error_msg.c_str());
+	// Don't fail this..would fail the whole commit, and the group isn't joined
+	// anyway, so no loss of validity in the configuration.
+	return XORP_OK;
     }
     JoinedMulticastGroup& jmg = joined_iter->second;
 
diff --git a/fea/io_link_manager.cc b/fea/io_link_manager.cc
index 907b026..141eaaa 100644
--- a/fea/io_link_manager.cc
+++ b/fea/io_link_manager.cc
@@ -398,7 +398,10 @@ IoLinkComm::leave_multicast_group(const Mac&	group_address,
 			     group_address.str().c_str(),
 			     if_name().c_str(),
 			     vif_name().c_str());
-	return (XORP_ERROR);
+	XLOG_WARNING("%s", error_msg.c_str());
+	// Don't fail this..would fail the whole commit, and the group isn't joined
+	// anyway, so no loss of validity in the configuration.
+	return XORP_OK;
     }
     JoinedMulticastGroup& jmg = joined_iter->second;
 
diff --git a/fea/io_tcpudp_manager.cc b/fea/io_tcpudp_manager.cc
index 74ae947..8f5286c 100644
--- a/fea/io_tcpudp_manager.cc
+++ b/fea/io_tcpudp_manager.cc
@@ -504,7 +504,10 @@ IoTcpUdpComm::udp_leave_group(const IPvX& mcast_addr,
 			     "the group was not joined",
 			     mcast_addr.str().c_str(),
 			     leave_if_addr.str().c_str());
-	return (XORP_ERROR);
+	XLOG_WARNING("%s", error_msg.c_str());
+	// Don't fail this..would fail the whole commit, and the group isn't joined
+	// anyway, so no loss of validity in the configuration.
+	return XORP_OK;
     }
 
     JoinedMulticastGroup& jmg = joined_iter->second;
_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to