summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.h
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2016-11-17 16:11:56 +0100
committerJohn Crispin <john@phrozen.org>2016-11-21 11:35:30 +0100
commit6c3bc0141dacc88992583d6f2cdc8a360df7422d (patch)
tree4cf9e6f28c5e398106aa3f6d88155b71cef5e0cf /src/odhcpd.h
parent801cfeea100ca7b211c9841f0fcb757b17f47860 (diff)
config: Support infinite as DHCP pool leasetime value
Add support for infinite leasetime value; this can be done by specifying "infinite" as leasetime value which is similar to dnsmasq infinite leasetime support. Specifying "infinite" as leasetime is valid for both the host and dhcp uci sections. A DHCPv4/DHCPv6 assignment is now considered infinite if valid_unil holds the value 0. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src/odhcpd.h')
-rw-r--r--src/odhcpd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/odhcpd.h b/src/odhcpd.h
index 3e8fc3e..e322ebd 100644
--- a/src/odhcpd.h
+++ b/src/odhcpd.h
@@ -44,6 +44,8 @@
#define RELAYD_BUFFER_SIZE 8192
#define RELAYD_MAX_PREFIXES 8
+#define INFINITE_VALID(x) ((x) == 0)
+
#define _unused __attribute__((unused))
#define _packed __attribute__((packed))