]> git.puffer.fish Git - mirror/frr.git/commitdiff
pim6d: Completing "ipv6 mld last-member-query-count" command.
authorAbhishek N R <abnr@vmware.com>
Mon, 11 Jul 2022 15:51:52 +0000 (08:51 -0700)
committerAbhishek N R <abnr@vmware.com>
Mon, 29 Aug 2022 06:33:07 +0000 (23:33 -0700)
Signed-off-by: Abhishek N R <abnr@vmware.com>
pimd/pim6_mld.c
pimd/pim6_mld.h
pimd/pim_nb_config.c
pimd/pim_vty.c

index 2bffede800736cb6f9efbfd4f735a8e014aefaed..2ffdefc2feffa07e9de038c2db5c03b6b894e195 100644 (file)
@@ -418,7 +418,7 @@ static void gm_sg_update(struct gm_sg *sg, bool has_expired)
                        gm_sg_timer_start(gm_ifp, sg, timers.expire_wait);
 
                        THREAD_OFF(sg->t_sg_query);
-                       sg->n_query = gm_ifp->cur_qrv;
+                       sg->n_query = gm_ifp->cur_lmqc;
                        sg->query_sbit = false;
                        gm_trigger_specific(sg);
                }
@@ -2095,6 +2095,7 @@ static void gm_start(struct interface *ifp)
        gm_ifp->cur_query_intv = pim_ifp->gm_default_query_interval * 1000;
        gm_ifp->cur_query_intv_trig = gm_ifp->cur_query_intv;
        gm_ifp->cur_max_resp = pim_ifp->gm_query_max_response_time_dsec * 100;
+       gm_ifp->cur_lmqc = pim_ifp->gm_last_member_query_count;
 
        gm_ifp->cfg_timing_fuzz.tv_sec = 0;
        gm_ifp->cfg_timing_fuzz.tv_usec = 10 * 1000;
@@ -2277,6 +2278,9 @@ void gm_ifp_update(struct interface *ifp)
        if (gm_ifp->cur_max_resp != cfg_max_response)
                gm_ifp->cur_max_resp = cfg_max_response;
 
+       if (gm_ifp->cur_lmqc != pim_ifp->gm_last_member_query_count)
+               gm_ifp->cur_lmqc = pim_ifp->gm_last_member_query_count;
+
        enum gm_version cfg_version;
 
        if (pim_ifp->mld_version == 1)
index 95523c2922b6b7c2a2a858b85ecc8bd5c3daa9db..540d2e1899df118d95f44cf6fab4c244f506854b 100644 (file)
@@ -324,6 +324,7 @@ struct gm_if {
        unsigned int cur_query_intv_trig; /* ms */
        unsigned int cur_max_resp;        /* ms */
        enum gm_version cur_version;
+       int cur_lmqc; /* last member query count in ds */
 
        /* this value (positive, default 10ms) defines our "timing tolerance":
         * - added to deadlines for expiring joins
index 87c8659fc5cb3babae8d699ae2a73098613e0a00..582878e09e3de0f6208e33efbe46cade9c7d6cb6 100644 (file)
@@ -2861,7 +2861,6 @@ int lib_interface_gmp_address_family_last_member_query_interval_modify(
 int lib_interface_gmp_address_family_robustness_variable_modify(
        struct nb_cb_modify_args *args)
 {
-#if PIM_IPV == 4
        struct interface *ifp;
        struct pim_interface *pim_ifp;
        int last_member_query_count;
@@ -2880,9 +2879,6 @@ int lib_interface_gmp_address_family_robustness_variable_modify(
 
                break;
        }
-#else
-       /* TBD Depends on MLD data structure changes */
-#endif
 
        return NB_OK;
 }
index 80faa503f30d399106166c377970ecbdf16597c3..a67ede9b49ef5bfb40f7f43f0131f63cba4bd191 100644 (file)
@@ -388,6 +388,13 @@ static int gm_config_write(struct vty *vty, int writes,
        if (pim_ifp->gm_default_query_interval != IGMP_GENERAL_QUERY_INTERVAL)
                vty_out(vty, " ipv6 mld query-interval %d\n",
                        pim_ifp->gm_default_query_interval);
+
+       /* IF ipv6 mld last-member_query-count */
+       if (pim_ifp->gm_last_member_query_count !=
+           IGMP_DEFAULT_ROBUSTNESS_VARIABLE)
+               vty_out(vty, " ipv6 mld last-member-query-count %d\n",
+                       pim_ifp->gm_last_member_query_count);
+
        return 0;
 }
 #endif