diff options
Diffstat (limited to 'zebra/zapi_msg.c')
| -rw-r--r-- | zebra/zapi_msg.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 9b84a6e58a..faa0eb90e4 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -63,6 +63,7 @@ #include "zebra/table_manager.h" #include "zebra/zapi_msg.h" #include "zebra/zebra_errors.h" +#include "zebra/zebra_mlag.h" /* Encoding helpers -------------------------------------------------------- */ @@ -432,8 +433,8 @@ int zsend_interface_vrf_update(struct zserv *client, struct interface *ifp, zclient_create_header(s, ZEBRA_INTERFACE_VRF_UPDATE, ifp->vrf_id); - /* Fill in the ifIndex of the interface and its new VRF (id) */ - stream_putl(s, ifp->ifindex); + /* Fill in the name of the interface and its new VRF (id) */ + stream_put(s, ifp->name, INTERFACE_NAMSIZ); stream_putl(s, vrf_id); /* Write packet size. */ @@ -1187,6 +1188,7 @@ static void zread_fec_register(ZAPI_HANDLER_ARGS) unsigned short l = 0; struct prefix p; uint16_t flags; + uint32_t label = MPLS_INVALID_LABEL; uint32_t label_index = MPLS_INVALID_LABEL_INDEX; s = msg; @@ -1229,12 +1231,15 @@ static void zread_fec_register(ZAPI_HANDLER_ARGS) l += 5; STREAM_GET(&p.u.prefix, s, PSIZE(p.prefixlen)); l += PSIZE(p.prefixlen); - if (flags & ZEBRA_FEC_REGISTER_LABEL_INDEX) { + if (flags & ZEBRA_FEC_REGISTER_LABEL) { + STREAM_GETL(s, label); + l += 4; + } else if (flags & ZEBRA_FEC_REGISTER_LABEL_INDEX) { STREAM_GETL(s, label_index); l += 4; - } else - label_index = MPLS_INVALID_LABEL_INDEX; - zebra_mpls_fec_register(zvrf, &p, label_index, client); + } + + zebra_mpls_fec_register(zvrf, &p, label, label_index, client); } stream_failure: @@ -1653,6 +1658,7 @@ static void zsend_capabilities(struct zserv *client, struct zebra_vrf *zvrf) zclient_create_header(s, ZEBRA_CAPABILITIES, zvrf->vrf->vrf_id); stream_putc(s, mpls_enabled); stream_putl(s, multipath_num); + stream_putc(s, zebra_mlag_get_role()); stream_putw_at(s, 0, stream_get_endp(s)); zserv_send_message(client, s); |
