summaryrefslogtreecommitdiffstats
path: root/src/bin/dhcp4/dhcp4_parser.yy
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2019-05-15 21:51:44 +0200
committerFrancis Dupont <fdupont@isc.org>2019-06-22 16:05:23 +0200
commit29d0f7c25f94574fd44dfbb3dcdb969d538c8b7e (patch)
tree7c9184e38c75b5003d9040988abaece80f9857bd /src/bin/dhcp4/dhcp4_parser.yy
parent[545-fixed-ldadd-in-2-makefiles] Rordered LDADD in Makefiles where duplicates... (diff)
downloadkea-29d0f7c25f94574fd44dfbb3dcdb969d538c8b7e.tar.xz
kea-29d0f7c25f94574fd44dfbb3dcdb969d538c8b7e.zip
[295-min-max-lease-time-configuration-options] Extend syntax
Diffstat (limited to 'src/bin/dhcp4/dhcp4_parser.yy')
-rw-r--r--src/bin/dhcp4/dhcp4_parser.yy27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/bin/dhcp4/dhcp4_parser.yy b/src/bin/dhcp4/dhcp4_parser.yy
index ec521c663c..7205580314 100644
--- a/src/bin/dhcp4/dhcp4_parser.yy
+++ b/src/bin/dhcp4/dhcp4_parser.yy
@@ -102,6 +102,9 @@ using namespace std;
TCP_NODELAY "tcp-nodelay"
VALID_LIFETIME "valid-lifetime"
+ DEFAULT_VALID_LIFETIME "default-valid-lifetime"
+ MIN_VALID_LIFETIME "min-valid-lifetime"
+ MAX_VALID_LIFETIME "max-valid-lifetime"
RENEW_TIMER "renew-timer"
REBIND_TIMER "rebind-timer"
CALCULATE_TEE_TIMES "calculate-tee-times"
@@ -441,6 +444,9 @@ global_params: global_param
// These are the parameters that are allowed in the top-level for
// Dhcp4.
global_param: valid_lifetime
+ | default_valid_lifetime
+ | min_valid_lifetime
+ | max_valid_lifetime
| renew_timer
| rebind_timer
| decline_probation_period
@@ -487,6 +493,21 @@ valid_lifetime: VALID_LIFETIME COLON INTEGER {
ctx.stack_.back()->set("valid-lifetime", prf);
};
+default_valid_lifetime: DEFAULT_VALID_LIFETIME COLON INTEGER {
+ ElementPtr prf(new IntElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("valid-lifetime", prf);
+};
+
+min_valid_lifetime: MIN_VALID_LIFETIME COLON INTEGER {
+ ElementPtr prf(new IntElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("min-valid-lifetime", prf);
+};
+
+max_valid_lifetime: MAX_VALID_LIFETIME COLON INTEGER {
+ ElementPtr prf(new IntElement($3, ctx.loc2pos(@3)));
+ ctx.stack_.back()->set("max-valid-lifetime", prf);
+};
+
renew_timer: RENEW_TIMER COLON INTEGER {
ElementPtr prf(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("renew-timer", prf);
@@ -1085,6 +1106,9 @@ subnet4_params: subnet4_param
// This defines a list of allowed parameters for each subnet.
subnet4_param: valid_lifetime
+ | default_valid_lifetime
+ | min_valid_lifetime
+ | max_valid_lifetime
| renew_timer
| rebind_timer
| option_data_list
@@ -1239,6 +1263,9 @@ shared_network_param: name
| client_class
| require_client_classes
| valid_lifetime
+ | default_valid_lifetime
+ | min_valid_lifetime
+ | max_valid_lifetime
| user_context
| comment
| calculate_tee_times