diff options
| author | Stephen Worley <sworley@nvidia.com> | 2021-04-05 17:12:01 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@nvidia.com> | 2023-02-13 18:12:05 -0500 |
| commit | d5ea1185d58ab8fed07e80f2d261fa8e1b0c3624 (patch) | |
| tree | 1df57e7843321ce2b3a05679dd275a2b4a92a110 /zebra/zapi_msg.c | |
| parent | 4645cb6bc2a4635925dae16533d6277b8da376c4 (diff) | |
lib: add label_type as field in zapi_nexthop
Add the ability to specify the label type along with the labels
you are passing to zebra in zapi_nexthop. This is needed as we
abstract the label code to be re-used by evpn as well as mpls.
Protocols need to be able to set the type of label they have attached.
Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'zebra/zapi_msg.c')
| -rw-r--r-- | zebra/zapi_msg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 3288373dbe..15b5790923 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -1785,8 +1785,9 @@ static bool zapi_read_nexthops(struct zserv *client, struct prefix *p, && api_nh->type != NEXTHOP_TYPE_BLACKHOLE && api_nh->label_num > 0) { - if (CHECK_FLAG(flags, ZEBRA_FLAG_EVPN_ROUTE)) - label_type = ZEBRA_LSP_EVPN; + /* If label type was passed, use it */ + if (api_nh->label_type) + label_type = api_nh->label_type; else label_type = lsp_type_from_re_type(client->proto); |
