From: Donald Sharp Date: Sat, 15 Apr 2017 12:57:03 +0000 (-0400) Subject: zebra: Allow explicit-null as a label option X-Git-Tag: reindent-master-before~213^2~8 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=bf995813b2176819aa5816d8935cf73aeb2f7d51;p=matthieu%2Ffrr.git zebra: Allow explicit-null as a label option When entering 'mpls label bind ...' command allow the explicit-null as an option. Signed-off-by: Donald Sharp --- diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c index f46037487e..ae1de8be2e 100644 --- a/zebra/zebra_mpls_vty.c +++ b/zebra/zebra_mpls_vty.c @@ -243,6 +243,13 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix, if (!strcmp(label_str, "implicit-null")) label = MPLS_IMP_NULL_LABEL; + else if (!strcmp(label_str, "explicit-null")) + { + if (p.family == AF_INET) + label = MPLS_V4_EXP_NULL_LABEL; + else + label = MPLS_V6_EXP_NULL_LABEL; + } else { label = atoi(label_str); @@ -276,14 +283,15 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix, DEFUN (mpls_label_bind, mpls_label_bind_cmd, - "mpls label bind <(16-1048575)|implicit-null>", + "mpls label bind <(16-1048575)|implicit-null|explicit-null>", MPLS_STR "Label configuration\n" "Establish FEC to label binding\n" "IPv4 prefix\n" "IPv6 prefix\n" "MPLS Label to bind\n" - "Use Implicit-Null Label\n") + "Use Implicit-Null Label\n" + "Use Explicit-Null Label\n") { return zebra_mpls_bind (vty, 1, argv[3]->arg, argv[4]->arg); }