]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_bsm.c
Merge pull request #10657 from patrasar/pim_remove_in_addr_none
[mirror_frr.git] / pimd / pim_bsm.c
index 1ac6046866ede9d59f748cf6de4428a9e73d915b..c45823cb8799aa6e8c2e949780cc7b61f74ea706 100644 (file)
@@ -59,9 +59,9 @@ void pim_bsm_write_config(struct vty *vty, struct interface *ifp)
 
        if (pim_ifp) {
                if (!pim_ifp->bsm_enable)
-                       vty_out(vty, " no ip pim bsm\n");
+                       vty_out(vty, " no " PIM_AF_NAME " pim bsm\n");
                if (!pim_ifp->ucast_bsm_accept)
-                       vty_out(vty, " no ip pim unicast-bsm\n");
+                       vty_out(vty, " no " PIM_AF_NAME " pim unicast-bsm\n");
        }
 }
 
@@ -157,7 +157,7 @@ static struct bsgrp_node *pim_bsm_new_bsgrp_node(struct route_table *rt,
        return bsgrp;
 }
 
-static int pim_on_bs_timer(struct thread *t)
+static void pim_on_bs_timer(struct thread *t)
 {
        struct route_node *rn;
        struct bsm_scope *scope;
@@ -200,7 +200,6 @@ static int pim_on_bs_timer(struct thread *t)
                pim_bsm_rpinfos_free(bsgrp_node->partial_bsrp_list);
                bsgrp_node->pend_rp_cnt = 0;
        }
-       return 0;
 }
 
 static void pim_bs_timer_stop(struct bsm_scope *scope)
@@ -276,7 +275,7 @@ static bool is_hold_time_elapsed(void *data)
                return true;
 }
 
-static int pim_on_g2rp_timer(struct thread *t)
+static void pim_on_g2rp_timer(struct thread *t)
 {
        struct bsm_rpinfo *bsrp;
        struct bsm_rpinfo *bsrp_node;
@@ -312,14 +311,14 @@ static int pim_on_g2rp_timer(struct thread *t)
 
        if (!rn) {
                zlog_warn("%s: Route node doesn't exist", __func__);
-               return 0;
+               return;
        }
 
        rp_info = (struct rp_info *)rn->info;
 
        if (!rp_info) {
                route_unlock_node(rn);
-               return 0;
+               return;
        }
 
        if (rp_info->rp_src != RP_SRC_STATIC) {
@@ -342,8 +341,6 @@ static int pim_on_g2rp_timer(struct thread *t)
                                    &bsgrp_node->group);
                pim_free_bsgrp_data(bsgrp_node);
        }
-
-       return 0;
 }
 
 static void pim_g2rp_timer_start(struct bsm_rpinfo *bsrp, int hold_time)
@@ -1373,7 +1370,12 @@ int pim_bsm_process(struct interface *ifp, struct ip *ip_hdr, uint8_t *buf,
                }
        }
 
-       if (ip_hdr->ip_dst.s_addr == qpim_all_pim_routers_addr.s_addr) {
+#if PIM_IPV == 4
+       if (ip_hdr->ip_dst.s_addr == qpim_all_pim_routers_addr.s_addr)
+#else
+       if (0)
+#endif
+       {
                /* Multicast BSMs are only accepted if source interface & IP
                 * match RPF towards the BSR's IP address, or they have
                 * no-forward set