Just to make things clear, here is a little background on the specific case below.

In our tests, pimd asserts/terminates occasionally like the one spot below. After extensive testing we found that this assertion takes place at an early stage when we first bring up the network. Different routers might have different views of the network and some might still not have routes to all other routers and in the case of PIM different routers might have different RPs at that stage. Router A has a default route to B, router B doesn't have a default route yet. A sends igmp/join to B, B tries to send a packet to A but since it doesn't have a route yet (even a default one), it doesn't find an interface to use which triggers the assertion below.

--Jafar



On 6/11/2015 11:51 PM, Jafar Al-Gharaibeh wrote:
Donald,

We have been using pimd for a couple of years and we had submitted several bug fixes that seem to have made it to the official sources which is great, especially with the addition of pimd to the official Quagga. There are several places in the code where asserts appear to be an "overkill". In at least two locations, we replaced asserts with warnings and bail out of the function where the condition that triggers the assert occurs. pimd just moves on afterward instead of terminating when the error shouldn't have been fatal to begin with I think. Here is an example:

diff --git a/pimd/pim_join.c b/pimd/pim_join.c
index 9d8e001..93ec09f 100644
--- a/pimd/pim_join.c
+++ b/pimd/pim_join.c
@@ -301,6 +301,21 @@ int pim_joinprune_send(struct interface *ifp,
   int pim_msg_size;
   int remain;

+  /* TODO: should we die or bail out ? */
+  if (!ifp) {
+    char source_str[100];
+    char group_str[100];
+    char dst_str[100];
+ pim_inet4_dump("<src?>", source_addr, source_str, sizeof(source_str));
+    pim_inet4_dump("<grp?>", group_addr, group_str, sizeof(group_str));
+    pim_inet4_dump("<dst?>", upstream_addr, dst_str, sizeof(dst_str));
+    zlog_warn("%s: no interface for pim %s(S,G)=(%s,%s) to upstream=%s",
+                __PRETTY_FUNCTION__,
+                send_join ? "Join": "Prune",
+                source_str, group_str, dst_str);
+    return 0;
+  }
+
   zassert(ifp);

   pim_ifp = ifp->info;

Does this make sense, or is this a terrible idea?! I can bring up at least another example. The main goal is to determine if these are really fatal or recoverable errors.

Thanks,
Jafar

_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev



_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to