mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 09:20:25 +00:00
pimd: Turn on igmp when igmp commands are entered
When you enter these commands, under an interface: ip igmp version ... ip igmp query-interval ... ip igmp query-max-response-time ... ip igmp query-max-response-time-dsec ... These commands will now just turn on igmp for the interface. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
5f413b1473
commit
21419f5932
@ -3657,13 +3657,9 @@ DEFUN (no_ip_ssmpingd,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (interface_ip_igmp,
|
static int
|
||||||
interface_ip_igmp_cmd,
|
pim_cmd_igmp_start (struct vty *vty, struct interface *ifp)
|
||||||
"ip igmp",
|
|
||||||
IP_STR
|
|
||||||
IFACE_IGMP_STR)
|
|
||||||
{
|
{
|
||||||
VTY_DECLVAR_CONTEXT(interface, ifp);
|
|
||||||
struct pim_interface *pim_ifp;
|
struct pim_interface *pim_ifp;
|
||||||
|
|
||||||
pim_ifp = ifp->info;
|
pim_ifp = ifp->info;
|
||||||
@ -3686,6 +3682,17 @@ DEFUN (interface_ip_igmp,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN (interface_ip_igmp,
|
||||||
|
interface_ip_igmp_cmd,
|
||||||
|
"ip igmp",
|
||||||
|
IP_STR
|
||||||
|
IFACE_IGMP_STR)
|
||||||
|
{
|
||||||
|
VTY_DECLVAR_CONTEXT(interface, ifp);
|
||||||
|
|
||||||
|
return pim_cmd_igmp_start(vty, ifp);
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN (interface_no_ip_igmp,
|
DEFUN (interface_no_ip_igmp,
|
||||||
interface_no_ip_igmp_cmd,
|
interface_no_ip_igmp_cmd,
|
||||||
"no ip igmp",
|
"no ip igmp",
|
||||||
@ -3949,15 +3956,15 @@ DEFUN (interface_ip_igmp_query_interval,
|
|||||||
struct pim_interface *pim_ifp;
|
struct pim_interface *pim_ifp;
|
||||||
int query_interval;
|
int query_interval;
|
||||||
int query_interval_dsec;
|
int query_interval_dsec;
|
||||||
|
int ret;
|
||||||
|
|
||||||
pim_ifp = ifp->info;
|
pim_ifp = ifp->info;
|
||||||
|
|
||||||
if (!pim_ifp) {
|
if (!pim_ifp) {
|
||||||
vty_out(vty,
|
ret = pim_cmd_igmp_start(vty, ifp);
|
||||||
"IGMP not enabled on interface %s. Please enable IGMP first.%s",
|
if (ret != CMD_SUCCESS)
|
||||||
ifp->name,
|
return ret;
|
||||||
VTY_NEWLINE);
|
pim_ifp = ifp->info;
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
query_interval = atoi(argv[3]->arg);
|
query_interval = atoi(argv[3]->arg);
|
||||||
@ -4038,15 +4045,15 @@ DEFUN (interface_ip_igmp_version,
|
|||||||
VTY_DECLVAR_CONTEXT(interface,ifp);
|
VTY_DECLVAR_CONTEXT(interface,ifp);
|
||||||
struct pim_interface *pim_ifp;
|
struct pim_interface *pim_ifp;
|
||||||
int igmp_version;
|
int igmp_version;
|
||||||
|
int ret;
|
||||||
|
|
||||||
pim_ifp = ifp->info;
|
pim_ifp = ifp->info;
|
||||||
|
|
||||||
if (!pim_ifp) {
|
if (!pim_ifp) {
|
||||||
vty_out(vty,
|
ret = pim_cmd_igmp_start(vty, ifp);
|
||||||
"IGMP not enabled on interface %s. Please enable IGMP first.%s",
|
if (ret != CMD_SUCCESS)
|
||||||
ifp->name,
|
return ret;
|
||||||
VTY_NEWLINE);
|
pim_ifp = ifp->info;
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
igmp_version = atoi(argv[3]->arg);
|
igmp_version = atoi(argv[3]->arg);
|
||||||
@ -4091,15 +4098,15 @@ DEFUN (interface_ip_igmp_query_max_response_time,
|
|||||||
VTY_DECLVAR_CONTEXT(interface, ifp);
|
VTY_DECLVAR_CONTEXT(interface, ifp);
|
||||||
struct pim_interface *pim_ifp;
|
struct pim_interface *pim_ifp;
|
||||||
int query_max_response_time;
|
int query_max_response_time;
|
||||||
|
int ret;
|
||||||
|
|
||||||
pim_ifp = ifp->info;
|
pim_ifp = ifp->info;
|
||||||
|
|
||||||
if (!pim_ifp) {
|
if (!pim_ifp) {
|
||||||
vty_out(vty,
|
ret = pim_cmd_igmp_start(vty, ifp);
|
||||||
"IGMP not enabled on interface %s. Please enable IGMP first.%s",
|
if (ret != CMD_SUCCESS)
|
||||||
ifp->name,
|
return ret;
|
||||||
VTY_NEWLINE);
|
pim_ifp = ifp->info;
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
query_max_response_time = atoi(argv[3]->arg);
|
query_max_response_time = atoi(argv[3]->arg);
|
||||||
@ -4154,15 +4161,15 @@ DEFUN_HIDDEN (interface_ip_igmp_query_max_response_time_dsec,
|
|||||||
struct pim_interface *pim_ifp;
|
struct pim_interface *pim_ifp;
|
||||||
int query_max_response_time_dsec;
|
int query_max_response_time_dsec;
|
||||||
int default_query_interval_dsec;
|
int default_query_interval_dsec;
|
||||||
|
int ret;
|
||||||
|
|
||||||
pim_ifp = ifp->info;
|
pim_ifp = ifp->info;
|
||||||
|
|
||||||
if (!pim_ifp) {
|
if (!pim_ifp) {
|
||||||
vty_out(vty,
|
ret = pim_cmd_igmp_start(vty, ifp);
|
||||||
"IGMP not enabled on interface %s. Please enable IGMP first.%s",
|
if (ret != CMD_SUCCESS)
|
||||||
ifp->name,
|
return ret;
|
||||||
VTY_NEWLINE);
|
pim_ifp = ifp->info;
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
query_max_response_time_dsec = atoi(argv[4]->arg);
|
query_max_response_time_dsec = atoi(argv[4]->arg);
|
||||||
|
Loading…
Reference in New Issue
Block a user