summaryrefslogtreecommitdiff
path: root/common/parse.c
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2013-11-25 21:00:41 -0800
committerShawn Routhier <sar@isc.org>2013-11-25 21:00:41 -0800
commit619304cd878299078b5dde9ad0fe30c3a7592026 (patch)
tree610293de37d4323a820b284dbbd3fece27fde1b3 /common/parse.c
parent0895c955d16a957107771e442397c6260d92cbc2 (diff)
downloadisc-dhcp-619304cd878299078b5dde9ad0fe30c3a7592026.tar.gz
[master] Support using v6 relay options in server decicions.
Diffstat (limited to 'common/parse.c')
-rw-r--r--common/parse.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/common/parse.c b/common/parse.c
index d931b97c..dd40bdbf 100644
--- a/common/parse.c
+++ b/common/parse.c
@@ -3463,6 +3463,8 @@ int parse_boolean (cfile)
* HARDWARE |
* PACKET LPAREN numeric-expression COMMA
* numeric-expression RPAREN |
+ * V6RELAY LPAREN numeric-expression COMMA
+ * data-expression RPAREN |
* STRING |
* colon_separated_hex_list
*/
@@ -4333,6 +4335,34 @@ int parse_non_binary (expr, cfile, lose, context)
goto norparen;
break;
+ case V6RELAY:
+ skip_token(&val, NULL, cfile);
+ if (!expression_allocate (expr, MDL))
+ log_fatal ("can't allocate expression");
+ (*expr)->op = expr_v6relay;
+
+ token = next_token (&val, NULL, cfile);
+ if (token != LPAREN)
+ goto nolparen;
+
+ if (!parse_numeric_expression (&(*expr)->data.v6relay.relay,
+ cfile, lose))
+ goto nodata;
+
+ token = next_token (&val, NULL, cfile);
+ if (token != COMMA)
+ goto nocomma;
+
+ if (!parse_data_expression (&(*expr)->data.v6relay.roption,
+ cfile, lose))
+ goto nodata;
+
+ token = next_token (&val, NULL, cfile);
+
+ if (token != RPAREN)
+ goto norparen;
+ break;
+
/* Not a valid start to an expression... */
default:
if (token != NAME && token != NUMBER_OR_NAME)