]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_assert.c
isisd: implement the 'if-state-change' notification
[mirror_frr.git] / pimd / pim_assert.c
index e1c961491f48772905f8d8dc5892d49ae1ef8ea9..3f863ebeca80e575f8ef797eceb3590a5be7eed4 100644 (file)
@@ -47,6 +47,7 @@ void pim_ifassert_winner_set(struct pim_ifchannel *ch,
                             struct in_addr winner,
                             struct pim_assert_metric winner_metric)
 {
+       struct pim_interface *pim_ifp = ch->interface->info;
        int winner_changed = (ch->ifassert_winner.s_addr != winner.s_addr);
        int metric_changed = !pim_assert_metric_match(
                &ch->ifassert_winner_metric, &winner_metric);
@@ -81,7 +82,7 @@ void pim_ifassert_winner_set(struct pim_ifchannel *ch,
        ch->ifassert_creation = pim_time_monotonic_sec();
 
        if (winner_changed || metric_changed) {
-               pim_upstream_update_join_desired(ch->upstream);
+               pim_upstream_update_join_desired(pim_ifp->pim, ch->upstream);
                pim_ifchannel_update_could_assert(ch);
                pim_ifchannel_update_assert_tracking_desired(ch);
        }
@@ -146,7 +147,7 @@ static int dispatch_assert(struct interface *ifp, struct in_addr source_addr,
        memset(&sg, 0, sizeof(struct prefix_sg));
        sg.src = source_addr;
        sg.grp = group_addr;
-       ch = pim_ifchannel_add(ifp, &sg, 0);
+       ch = pim_ifchannel_add(ifp, &sg, 0, 0);
        if (!ch) {
                zlog_warn(
                        "%s: (S,G)=%s failure creating channel on interface %s",
@@ -404,9 +405,9 @@ int pim_assert_build_msg(uint8_t *pim_msg, int buf_size, struct interface *ifp,
        }
 
        /* Metric preference */
-       pim_write_uint32(pim_msg_curr, rpt_bit_flag
-                                              ? metric_preference | 0x80000000
-                                              : metric_preference);
+       pim_write_uint32(pim_msg_curr,
+                        rpt_bit_flag ? metric_preference | 0x80000000
+                                     : metric_preference);
        pim_msg_curr += 4;
 
        /* Route metric */