mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
zebra: mc_forwarding was being sent but not retrieved across dataplane
The mc_forwarding status for an interface was being sent but not properly retrieved on the zebra master side of the dplane. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
f646c17a43
commit
4c84aa5ebd
@ -1407,7 +1407,7 @@ static void zebra_if_netconf_update_ctx(struct zebra_dplane_ctx *ctx,
|
|||||||
struct interface *ifp)
|
struct interface *ifp)
|
||||||
{
|
{
|
||||||
struct zebra_if *zif;
|
struct zebra_if *zif;
|
||||||
enum dplane_netconf_status_e mpls, linkdown;
|
enum dplane_netconf_status_e mpls, mcast_on, linkdown;
|
||||||
|
|
||||||
zif = ifp->info;
|
zif = ifp->info;
|
||||||
if (!zif) {
|
if (!zif) {
|
||||||
@ -1430,11 +1430,19 @@ static void zebra_if_netconf_update_ctx(struct zebra_dplane_ctx *ctx,
|
|||||||
else if (linkdown == DPLANE_NETCONF_STATUS_DISABLED)
|
else if (linkdown == DPLANE_NETCONF_STATUS_DISABLED)
|
||||||
zif->linkdown = false;
|
zif->linkdown = false;
|
||||||
|
|
||||||
|
mcast_on = dplane_ctx_get_netconf_mcast(ctx);
|
||||||
|
if (mcast_on == DPLANE_NETCONF_STATUS_ENABLED)
|
||||||
|
zif->v4mcast_on = true;
|
||||||
|
else if (mcast_on == DPLANE_NETCONF_STATUS_DISABLED)
|
||||||
|
zif->v4mcast_on = false;
|
||||||
|
|
||||||
if (IS_ZEBRA_DEBUG_KERNEL)
|
if (IS_ZEBRA_DEBUG_KERNEL)
|
||||||
zlog_debug("%s: if %s, ifindex %d, mpls %s linkdown %s",
|
zlog_debug(
|
||||||
__func__, ifp->name, ifp->ifindex,
|
"%s: if %s, ifindex %d, mpls %s mc_forwarding: %s linkdown %s",
|
||||||
(zif->mpls ? "ON" : "OFF"),
|
__func__, ifp->name, ifp->ifindex,
|
||||||
(zif->linkdown ? "ON" : "OFF"));
|
(zif->mpls ? "ON" : "OFF"),
|
||||||
|
(zif->v4mcast_on ? "ON" : "OFF"),
|
||||||
|
(zif->linkdown ? "ON" : "OFF"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void zebra_if_dplane_result(struct zebra_dplane_ctx *ctx)
|
void zebra_if_dplane_result(struct zebra_dplane_ctx *ctx)
|
||||||
@ -1900,6 +1908,9 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
|
|||||||
if (zebra_if->linkdown)
|
if (zebra_if->linkdown)
|
||||||
vty_out(vty, " Ignore all routes with linkdown\n");
|
vty_out(vty, " Ignore all routes with linkdown\n");
|
||||||
|
|
||||||
|
if (zebra_if->v4mcast_on)
|
||||||
|
vty_out(vty, " v4 Multicast forwarding is on\n");
|
||||||
|
|
||||||
/* Hardware address. */
|
/* Hardware address. */
|
||||||
vty_out(vty, " Type: %s\n", if_link_type_str(ifp->ll_type));
|
vty_out(vty, " Type: %s\n", if_link_type_str(ifp->ll_type));
|
||||||
if (ifp->hw_addr_len != 0) {
|
if (ifp->hw_addr_len != 0) {
|
||||||
@ -2222,6 +2233,7 @@ static void if_dump_vty_json(struct vty *vty, struct interface *ifp,
|
|||||||
|
|
||||||
json_object_boolean_add(json_if, "mplsEnabled", zebra_if->mpls);
|
json_object_boolean_add(json_if, "mplsEnabled", zebra_if->mpls);
|
||||||
json_object_boolean_add(json_if, "linkDown", zebra_if->linkdown);
|
json_object_boolean_add(json_if, "linkDown", zebra_if->linkdown);
|
||||||
|
json_object_boolean_add(json_if, "mcForwarding", zebra_if->v4mcast_on);
|
||||||
|
|
||||||
if (ifp->ifindex == IFINDEX_INTERNAL) {
|
if (ifp->ifindex == IFINDEX_INTERNAL) {
|
||||||
json_object_boolean_add(json_if, "pseudoInterface", true);
|
json_object_boolean_add(json_if, "pseudoInterface", true);
|
||||||
|
@ -132,6 +132,9 @@ struct zebra_if {
|
|||||||
/* Linkdown status */
|
/* Linkdown status */
|
||||||
bool linkdown;
|
bool linkdown;
|
||||||
|
|
||||||
|
/* Is Multicast Forwarding on? */
|
||||||
|
bool v4mcast_on;
|
||||||
|
|
||||||
/* Router advertise configuration. */
|
/* Router advertise configuration. */
|
||||||
uint8_t rtadv_enable;
|
uint8_t rtadv_enable;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user