From 1c1cf002a1e1975993e36c42daec14657e2bdc38 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Wed, 14 Sep 2016 15:27:21 -0300 Subject: [PATCH] MPLS: ignore hardware restrictions when --enable-cumulus is not given. Signed-off-by: Renato Westphal --- zebra/zebra_mpls.c | 3 ++- zebra/zebra_mpls.h | 2 ++ zebra/zebra_vty.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 6b032707ac..07b69eccd6 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -1520,6 +1520,7 @@ mpls_ldp_ftn_uninstall_all (struct zebra_vrf *zvrf, int afi) } } +#if defined(HAVE_CUMULUS) /* * Check that the label values used in LSP creation are consistent. The * main criteria is that if there is ECMP, the label operation must still @@ -1575,7 +1576,7 @@ zebra_mpls_lsp_label_consistent (struct zebra_vrf *zvrf, mpls_label_t in_label, /* Label values are good. */ return 1; } - +#endif /* HAVE_CUMULUS */ /* * Add static LSP entry. This may be the first entry for this incoming label diff --git a/zebra/zebra_mpls.h b/zebra/zebra_mpls.h index 7c672fa433..becef524fd 100644 --- a/zebra/zebra_mpls.h +++ b/zebra/zebra_mpls.h @@ -205,6 +205,7 @@ mpls_ldp_lsp_uninstall_all (struct hash_backet *backet, void *ctxt); void mpls_ldp_ftn_uninstall_all (struct zebra_vrf *zvrf, int afi); +#if defined(HAVE_CUMULUS) /* * Check that the label values used in LSP creation are consistent. The * main criteria is that if there is ECMP, the label operation must still @@ -215,6 +216,7 @@ int zebra_mpls_lsp_label_consistent (struct zebra_vrf *zvrf, mpls_label_t in_label, mpls_label_t out_label, enum nexthop_types_t gtype, union g_addr *gate, char *ifname, ifindex_t ifindex); +#endif /* HAVE_CUMULUS */ /* * Add static LSP entry. This may be the first entry for this incoming label diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 14f8f18540..aa3da71ce5 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -2100,6 +2100,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str, if (add_cmd) { +#if defined(HAVE_CUMULUS) /* Check that label value is consistent. */ if (!zebra_mpls_lsp_label_consistent (zvrf, in_label, out_label, gtype, &gate, NULL, 0)) @@ -2108,6 +2109,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str, VTY_NEWLINE); return CMD_WARNING; } +#endif /* HAVE_CUMULUS */ ret = zebra_mpls_static_lsp_add (zvrf, in_label, out_label, gtype, &gate, NULL, 0); -- 2.39.5