From e64f3c323bf176544c5d0cac9a9d55fc4510972a Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Sat, 17 Sep 2016 10:55:24 -0300 Subject: zebra: add explicit-null option for static MPLS LSPs Signed-off-by: Renato Westphal --- zebra/zebra_mpls_vty.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'zebra/zebra_mpls_vty.c') diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c index 6975ba560..e5f6932e8 100644 --- a/zebra/zebra_mpls_vty.c +++ b/zebra/zebra_mpls_vty.c @@ -115,6 +115,10 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str, { if (outlabel_str[0] == 'i') out_label = MPLS_IMP_NULL_LABEL; + else if (outlabel_str[0] == 'e' && gtype == NEXTHOP_TYPE_IPV4) + out_label = MPLS_V4_EXP_NULL_LABEL; + else if (outlabel_str[0] == 'e' && gtype == NEXTHOP_TYPE_IPV6) + out_label = MPLS_V6_EXP_NULL_LABEL; else out_label = atoi(outlabel_str); } @@ -150,13 +154,14 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str, DEFUN (mpls_transit_lsp, mpls_transit_lsp_cmd, - "mpls lsp <16-1048575> (A.B.C.D|X:X::X:X) (<16-1048575>|implicit-null)", + "mpls lsp <16-1048575> (A.B.C.D|X:X::X:X) (<16-1048575>|explicit-null|implicit-null)", MPLS_STR "Establish label switched path\n" "Incoming MPLS label\n" "IPv4 gateway address\n" "IPv6 gateway address\n" "Outgoing MPLS label\n" + "Use Explicit-Null label\n" "Use Implicit-Null label\n") { return zebra_mpls_transit_lsp (vty, 1, argv[0], argv[1], argv[2], NULL); @@ -177,7 +182,7 @@ DEFUN (no_mpls_transit_lsp, ALIAS (no_mpls_transit_lsp, no_mpls_transit_lsp_out_label_cmd, - "no mpls lsp <16-1048575> (A.B.C.D|X:X::X:X) (<16-1048575>|implicit-null)", + "no mpls lsp <16-1048575> (A.B.C.D|X:X::X:X) (<16-1048575>|explicit-null|implicit-null)", NO_STR MPLS_STR "Establish label switched path\n" @@ -185,6 +190,7 @@ ALIAS (no_mpls_transit_lsp, "IPv4 gateway address\n" "IPv6 gateway address\n" "Outgoing MPLS label\n" + "Use Explicit-Null label\n" "Use Implicit-Null label\n") DEFUN (no_mpls_transit_lsp_all, -- cgit v1.2.3