Merge pull request #9224 from SaiGomathiN/saig

pimd: IGMP Query Generation
This commit is contained in:
Donald Sharp 2022-02-16 11:26:03 -05:00 committed by GitHub
commit 7b08708e65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -176,7 +176,7 @@ Certain signals have special meanings to *pimd*.
Generate IGMP query (v2/v3) on user requirement. This will not depend on Generate IGMP query (v2/v3) on user requirement. This will not depend on
the existing IGMP general query timer.If no version is provided in the cli, the existing IGMP general query timer.If no version is provided in the cli,
it will be considered as default v2 query.This is a hidden command. the default will be the igmp version enabled on that interface.
.. clicmd:: ip igmp watermark-warn (1-65535) .. clicmd:: ip igmp watermark-warn (1-65535)

View File

@ -8237,7 +8237,8 @@ DEFPY_HIDDEN (interface_ip_igmp_query_generate,
"IGMP version number\n") "IGMP version number\n")
{ {
VTY_DECLVAR_CONTEXT(interface, ifp); VTY_DECLVAR_CONTEXT(interface, ifp);
int igmp_version = 2; int igmp_version;
struct pim_interface *pim_ifp = ifp->info;
if (!ifp->info) { if (!ifp->info) {
vty_out(vty, "IGMP/PIM is not enabled on the interface %s\n", vty_out(vty, "IGMP/PIM is not enabled on the interface %s\n",
@ -8245,6 +8246,9 @@ DEFPY_HIDDEN (interface_ip_igmp_query_generate,
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }
/* It takes the igmp version configured on the interface as default */
igmp_version = pim_ifp->version;
if (argc > 3) if (argc > 3)
igmp_version = atoi(argv[4]->arg); igmp_version = atoi(argv[4]->arg);