lib, zebra: Send up whether or not v6_with_v4_nexthops are supported

After Zebra knows it's capability surrounding v6 with v4 nexthops
have it send this ability up to interested parties.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-08-02 20:56:35 -04:00
parent 1f5611c06d
commit 68f52d7a0c
3 changed files with 3 additions and 1 deletions

View File

@ -3876,6 +3876,7 @@ static int zclient_capability_decode(ZAPI_CALLBACK_ARGS)
cap.mpls_enabled = !!mpls_enabled;
STREAM_GETL(s, cap.ecmp);
STREAM_GETC(s, cap.role);
STREAM_GETC(s, cap.v6_with_v4_nexthop);
if (zclient->zebra_capabilities)
(*zclient->zebra_capabilities)(&cap);

View File

@ -274,6 +274,7 @@ struct zclient_capabilities {
uint32_t ecmp;
bool mpls_enabled;
enum mlag_role role;
bool v6_with_v4_nexthop;
};
/* Graceful Restart Capabilities message */

View File

@ -2319,7 +2319,7 @@ static void zsend_capabilities(struct zserv *client, struct zebra_vrf *zvrf)
stream_putc(s, mpls_enabled);
stream_putl(s, zrouter.multipath_num);
stream_putc(s, zebra_mlag_get_role());
stream_putc(s, zrouter.v6_with_v4_nexthop);
stream_putw_at(s, 0, stream_get_endp(s));
zserv_send_message(client, s);
}