mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 21:47:15 +02:00
patch from Frank van Maarseveen <F.vanMaarseveen@inter.NL.net>
[zebra 14599] PATCH: permit [no]multicast command for (yet) inactive interfaces
This commit is contained in:
parent
727d104b15
commit
48b33aaf70
|
@ -182,6 +182,14 @@ if_addr_wakeup (struct interface *ifp)
|
||||||
void
|
void
|
||||||
if_add_update (struct interface *ifp)
|
if_add_update (struct interface *ifp)
|
||||||
{
|
{
|
||||||
|
struct zebra_if *if_data;
|
||||||
|
|
||||||
|
if_data = ifp->info;
|
||||||
|
if (if_data->multicast == IF_ZEBRA_MULTICAST_ON)
|
||||||
|
if_set_flags (ifp, IFF_MULTICAST);
|
||||||
|
else if (if_data->multicast == IF_ZEBRA_MULTICAST_OFF)
|
||||||
|
if_unset_flags (ifp, IFF_MULTICAST);
|
||||||
|
|
||||||
zebra_interface_add_update (ifp);
|
zebra_interface_add_update (ifp);
|
||||||
|
|
||||||
if (! CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
|
if (! CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
|
||||||
|
@ -739,6 +747,8 @@ DEFUN (multicast,
|
||||||
struct zebra_if *if_data;
|
struct zebra_if *if_data;
|
||||||
|
|
||||||
ifp = (struct interface *) vty->index;
|
ifp = (struct interface *) vty->index;
|
||||||
|
if (CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
|
||||||
|
{
|
||||||
ret = if_set_flags (ifp, IFF_MULTICAST);
|
ret = if_set_flags (ifp, IFF_MULTICAST);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
@ -746,6 +756,7 @@ DEFUN (multicast,
|
||||||
return CMD_WARNING;
|
return CMD_WARNING;
|
||||||
}
|
}
|
||||||
if_refresh (ifp);
|
if_refresh (ifp);
|
||||||
|
}
|
||||||
if_data = ifp->info;
|
if_data = ifp->info;
|
||||||
if_data->multicast = IF_ZEBRA_MULTICAST_ON;
|
if_data->multicast = IF_ZEBRA_MULTICAST_ON;
|
||||||
|
|
||||||
|
@ -763,6 +774,8 @@ DEFUN (no_multicast,
|
||||||
struct zebra_if *if_data;
|
struct zebra_if *if_data;
|
||||||
|
|
||||||
ifp = (struct interface *) vty->index;
|
ifp = (struct interface *) vty->index;
|
||||||
|
if (CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE))
|
||||||
|
{
|
||||||
ret = if_unset_flags (ifp, IFF_MULTICAST);
|
ret = if_unset_flags (ifp, IFF_MULTICAST);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
@ -770,6 +783,7 @@ DEFUN (no_multicast,
|
||||||
return CMD_WARNING;
|
return CMD_WARNING;
|
||||||
}
|
}
|
||||||
if_refresh (ifp);
|
if_refresh (ifp);
|
||||||
|
}
|
||||||
if_data = ifp->info;
|
if_data = ifp->info;
|
||||||
if_data->multicast = IF_ZEBRA_MULTICAST_OFF;
|
if_data->multicast = IF_ZEBRA_MULTICAST_OFF;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue