]> git.puffer.fish Git - mirror/frr.git/commitdiff
pim6d: Implementing mld watermark-warn CLI completely 11505/head
authorSai Gomathi N <nsaigomathi@vmware.com>
Thu, 30 Jun 2022 09:02:05 +0000 (02:02 -0700)
committerSai Gomathi N <nsaigomathi@vmware.com>
Thu, 30 Jun 2022 09:05:13 +0000 (02:05 -0700)
Implementing the TBD of watermark-warn CLI for IPv6 MLD
This command can be use to warn the user
when more than the desired limit of groups gets configured.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
pimd/pim6_cmd.c
pimd/pim_vty.c

index a3275259047aafb1e965d9e0b4eb969e12814852..1a2829f962ec7871691ea9fc8e049f0850a19ca2 100644 (file)
@@ -686,9 +686,7 @@ DEFPY (ipv6_mld_group_watermark,
        "Group count to generate watermark warning\n")
 {
        PIM_DECLVAR_CONTEXT_VRF(vrf, pim);
-
-       /* TBD Depends on MLD data structure changes */
-       (void)pim;
+       pim->gm_watermark_limit = limit;
 
        return CMD_SUCCESS;
 }
@@ -703,9 +701,7 @@ DEFPY (no_ipv6_mld_group_watermark,
        IGNORED_IN_NO_STR)
 {
        PIM_DECLVAR_CONTEXT_VRF(vrf, pim);
-
-       /* TBD Depends on MLD data structure changes */
-       (void)pim;
+       pim->gm_watermark_limit = 0;
 
        return CMD_SUCCESS;
 }
index b00c25a482284fe52e72478ac8a737abf3bdb3ef..43d9c29278d1a601918b3d025c7a0f833360abe8 100644 (file)
@@ -261,8 +261,13 @@ int pim_global_config_write_worker(struct pim_instance *pim, struct vty *vty)
        }
 
        if (pim->gm_watermark_limit != 0) {
-               vty_out(vty, "%sip igmp watermark-warn %u\n", spaces,
-                       pim->gm_watermark_limit);
+#if PIM_IPV == 4
+               vty_out(vty, "%s" PIM_AF_NAME " igmp watermark-warn %u\n",
+                       spaces, pim->gm_watermark_limit);
+#else
+               vty_out(vty, "%s" PIM_AF_NAME " mld watermark-warn %u\n",
+                       spaces, pim->gm_watermark_limit);
+#endif
                ++writes;
        }