summaryrefslogtreecommitdiffstats
path: root/lib/command_parse.y
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-08-08 23:10:23 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-08-11 18:42:01 +0200
commit9779e3f19368fe05199cddc3bc4029288c34be3f (patch)
tree75e82daeba86fefd735f98f29b2f23c9148df572 /lib/command_parse.y
parentMerge pull request #953 from jbonor/nhrpd-fixes (diff)
downloadfrr-9779e3f19368fe05199cddc3bc4029288c34be3f.tar.xz
frr-9779e3f19368fe05199cddc3bc4029288c34be3f.zip
lib: add CLI token for 48-bit mac addresses
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_parse.y')
-rw-r--r--lib/command_parse.y12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/command_parse.y b/lib/command_parse.y
index 1bc8ea1a4..0f3e42219 100644
--- a/lib/command_parse.y
+++ b/lib/command_parse.y
@@ -101,6 +101,8 @@
%token <string> IPV6_PREFIX
%token <string> VARIABLE
%token <string> RANGE
+%token <string> MAC
+%token <string> MAC_PREFIX
/* union types for parsed rules */
%type <node> start
@@ -273,6 +275,16 @@ placeholder_token_real:
XFREE (MTYPE_LEX, $1);
}
+| MAC
+{
+ $$ = new_token_node (ctx, MAC_TKN, $1, doc_next(ctx));
+ XFREE (MTYPE_LEX, $1);
+}
+| MAC_PREFIX
+{
+ $$ = new_token_node (ctx, MAC_PREFIX_TKN, $1, doc_next(ctx));
+ XFREE (MTYPE_LEX, $1);
+}
placeholder_token:
placeholder_token_real varname_token