From 8fb8c0fcd63917fc500fe6f14436234edc6677ed Mon Sep 17 00:00:00 2001 From: majun Date: Tue, 1 Sep 2020 11:50:17 +0800 Subject: [PATCH] lease-time-config Signed-off-by: majun --- client/clparse.c | 5 +++++ common/conflex.c | 3 +++ includes/dhctoken.h | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/client/clparse.c b/client/clparse.c index d445bae..d43e8ae 100644 --- a/client/clparse.c +++ b/client/clparse.c @@ -453,6 +453,11 @@ void parse_client_statement (cfile, ip, config) struct option ***append_list, **new_list, **cat_list; switch (peek_token (&val, (unsigned *)0, cfile)) { + case LEASE_TIME_IPV6: + skip_token(&val, (unsigned *)0, cfile); + parse_lease_time (cfile, &config -> requested_lease); + return; + case INCLUDE: skip_token(&val, (unsigned *)0, cfile); token = next_token (&val, (unsigned *)0, cfile); diff --git a/common/conflex.c b/common/conflex.c index 71c0bf5..fa3acb8 100644 --- a/common/conflex.c +++ b/common/conflex.c @@ -1146,6 +1146,9 @@ intern(char *atom, enum dhcp_token dfv) { if (!strcasecmp (atom + 1, "ease-id-format")) { return LEASE_ID_FORMAT; } + if (!strcasecmp (atom + 1, "ease-time-ipv6")) { + return LEASE_TIME_IPV6; + } break; case 'm': if (!strncasecmp (atom + 1, "ax", 2)) { diff --git a/includes/dhctoken.h b/includes/dhctoken.h index b4d93ba..0bc31ca 100644 --- a/includes/dhctoken.h +++ b/includes/dhctoken.h @@ -378,7 +378,8 @@ enum dhcp_token { TOKEN_OCTAL = 678, KEY_ALGORITHM = 679, BOOTP_BROADCAST_ALWAYS = 680, - DESTINATION_DESCRIPTOR = 681 + DESTINATION_DESCRIPTOR = 681, + LEASE_TIME_IPV6 = 682 }; #define is_identifier(x) ((x) >= FIRST_TOKEN && \ -- 2.23.0