diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-02-08 09:50:32 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-02-08 20:35:14 -0500 |
| commit | 339e36d258ad73701d7b9eccc0e56e48cdea1a2d (patch) | |
| tree | 38adacaebff070103e0388f5aff39d8668cbbbef /zebra/zserv.c | |
| parent | 70e98a7fe7296a1279c6b7142e57221f71ff3121 (diff) | |
lib, sharpd, zebra: Add new enum for lsp type and pass it through.
Add the ability to pass the lsp owner type through the zapi
and in addition add a new label type for the sharp protocol
for testing.
Finally modify zebra_mpls.h to not have defaults specified
for the enum. That way when we add a new LSP type the
compile fails and the person doing the addition knows
where he has to touch shit.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zserv.c')
| -rw-r--r-- | zebra/zserv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c index bf8f66e20f..3d8be27f3b 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2493,16 +2493,17 @@ static void zread_vrf_label(struct zserv *client, mpls_label_t nlabel; struct stream *s; struct zebra_vrf *def_zvrf; + enum lsp_types_t ltype; s = client->ibuf; STREAM_GETL(s, nlabel); - if (nlabel == zvrf->label) { /* * Nothing to do here move along */ return; } + STREAM_GETC(s, ltype); if (zvrf->vrf->vrf_id != VRF_DEFAULT) ifp = if_lookup_by_name(zvrf->vrf->name, zvrf->vrf->vrf_id); @@ -2518,13 +2519,12 @@ static void zread_vrf_label(struct zserv *client, def_zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT); if (zvrf->label != MPLS_LABEL_IPV4_EXPLICIT_NULL) - mpls_lsp_uninstall(def_zvrf, ZEBRA_LSP_STATIC, - zvrf->label, NEXTHOP_TYPE_IFINDEX, - NULL, ifp->ifindex); + mpls_lsp_uninstall(def_zvrf, ltype, zvrf->label, + NEXTHOP_TYPE_IFINDEX, NULL, ifp->ifindex); if (nlabel != MPLS_LABEL_IPV4_EXPLICIT_NULL) - mpls_lsp_install(def_zvrf, ZEBRA_LSP_STATIC, nlabel, - MPLS_LABEL_IMPLICIT_NULL, NEXTHOP_TYPE_IFINDEX, NULL, ifp->ifindex); + mpls_lsp_install(def_zvrf, ltype, nlabel, MPLS_LABEL_IMPLICIT_NULL, + NEXTHOP_TYPE_IFINDEX, NULL, ifp->ifindex); zvrf->label = nlabel; stream_failure: |
