config: set RFC defaults for preferred lifetime master
authorPaul Donald <newtwen@gmail.com>
Tue, 9 Apr 2024 03:04:10 +0000 (05:04 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 7 May 2024 22:07:25 +0000 (00:07 +0200)
Update preferred lifetime default value in accordance with RFC4861.

Signed-off-by: Paul Donald <newtwen@gmail.com>
[ fix comment style ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
README
src/config.c

diff --git a/README b/README
index 243ae2477936c562ac2da969aca735c3bc595f1e..c8f2eb4234abe2628dba240f844fdb4a0db07dd5 100644 (file)
--- a/README
+++ b/README
@@ -116,7 +116,7 @@ domain                      list    <local search domain>   Search domains to announce
 leasetime              string  12h                     DHCPv4 address leasetime
 start                  integer 100                     DHCPv4 pool start
 limit                  integer 150                     DHCPv4 pool size
 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
                                                        for a prefix
 ra_default             integer 0                       Override default route
                        0: default, 1: ignore no public address, 2: ignore all
index 7fe31a14fed039b1580d78e812e15a577fd1b602..62d4857720aba118dd1260f53bbc4b5f5c7ac53c 100644 (file)
@@ -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->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;
        iface->dhcpv4_start.s_addr = htonl(START_DEFAULT);
        iface->dhcpv4_end.s_addr = htonl(START_DEFAULT + LIMIT_DEFAULT - 1);
        iface->dhcpv6_assignall = true;