]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_zebra.c
staticd: Do not ready prefix for printing till it's decoded
[mirror_frr.git] / pimd / pim_zebra.c
index 4fa4ea857fed7af63b5122dfb855b680cdf2cd70..10ea17cf1f80dfe0487c1a09bc99033c1e875570 100644 (file)
@@ -19,8 +19,6 @@
 
 #include <zebra.h>
 
-#include "zebra/rib.h"
-
 #include "if.h"
 #include "log.h"
 #include "prefix.h"
@@ -748,7 +746,7 @@ static void pim_zebra_connected(struct zclient *zclient)
 void pim_zebra_init(void)
 {
        /* Socket for receiving updates from Zebra daemon */
-       zclient = zclient_new_notify(master, &zclient_options_default);
+       zclient = zclient_new(master, &zclient_options_default);
 
        zclient->zebra_connected = pim_zebra_connected;
        zclient->router_id_update = pim_router_id_update_zebra;
@@ -1044,9 +1042,18 @@ void igmp_source_forward_start(struct pim_instance *pim,
                return;
        }
 
-       if (!(PIM_I_am_DR(pim_oif)))
-               return;
+       if (!(PIM_I_am_DR(pim_oif))) {
+               if (PIM_DEBUG_IGMP_TRACE)
+                       zlog_debug("%s: %s was received on %s interface but we are not DR for that interface",
+                                  __PRETTY_FUNCTION__,
+                                  pim_str_sg_dump(&sg),
+                                  group->group_igmp_sock->interface->name);
 
+               pim_channel_del_oif(source->source_channel_oil,
+                                   group->group_igmp_sock->interface,
+                                   PIM_OIF_FLAG_PROTO_IGMP);
+               return;
+       }
        /*
          Feed IGMPv3-gathered local membership information into PIM
          per-interface (S,G) state.
@@ -1056,6 +1063,10 @@ void igmp_source_forward_start(struct pim_instance *pim,
                if (PIM_DEBUG_MROUTE)
                        zlog_warn("%s: Failure to add local membership for %s",
                                  __PRETTY_FUNCTION__, pim_str_sg_dump(&sg));
+
+               pim_channel_del_oif(source->source_channel_oil,
+                                   group->group_igmp_sock->interface,
+                                   PIM_OIF_FLAG_PROTO_IGMP);
                return;
        }