From: Paul Donald Date: Tue, 9 Apr 2024 03:04:10 +0000 (+0200) Subject: config: set RFC defaults for preferred lifetime X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=project%2Fodhcpd.git config: set RFC defaults for preferred lifetime Update preferred lifetime default value in accordance with RFC4861. Signed-off-by: Paul Donald [ fix comment style ] Signed-off-by: Christian Marangi --- diff --git a/README b/README index 243ae24..c8f2eb4 100644 --- a/README +++ b/README @@ -116,7 +116,7 @@ domain list Search domains to announce leasetime string 12h DHCPv4 address leasetime start integer 100 DHCPv4 pool start limit integer 150 DHCPv4 pool size -preferred_lifetime string 12h Value for the preferred lifetime +preferred_lifetime string 7d Value for the preferred lifetime for a prefix ra_default integer 0 Override default route 0: default, 1: ignore no public address, 2: ignore all diff --git a/src/config.c b/src/config.c index 7fe31a1..62d4857 100644 --- a/src/config.c +++ b/src/config.c @@ -215,7 +215,7 @@ static void set_interface_defaults(struct interface *iface) iface->ndp = MODE_DISABLED; iface->learn_routes = 1; iface->dhcp_leasetime = 43200; - iface->preferred_lifetime = 43200; + iface->preferred_lifetime = 604800; /* rfc4861#section-6.2.1: AdvPreferredLifetime 7 days */ iface->dhcpv4_start.s_addr = htonl(START_DEFAULT); iface->dhcpv4_end.s_addr = htonl(START_DEFAULT + LIMIT_DEFAULT - 1); iface->dhcpv6_assignall = true;