]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Use different paths for PID and lease files when running in DHCPv4 or
authorEvan Hunt <each@isc.org>
Sat, 27 Oct 2007 19:15:37 +0000 (19:15 +0000)
committerEvan Hunt <each@isc.org>
Sat, 27 Oct 2007 19:15:37 +0000 (19:15 +0000)
DHCPv6 mode, so that servers for both protcols can be run simultaneously on
a single interface. [rt17227]

24 files changed:
RELNOTES
dst/dst_support.c
includes/cf/aix.h
includes/cf/alphaosf.h
includes/cf/bsdos.h
includes/cf/cygwin32.h
includes/cf/freebsd.h
includes/cf/hpux.h
includes/cf/irix.h
includes/cf/linux.h
includes/cf/netbsd.h
includes/cf/nextstep.h
includes/cf/openbsd.h
includes/cf/qnx.h
includes/cf/rhapsody.h
includes/cf/sample.h
includes/cf/sco.h
includes/cf/sunos4.h
includes/cf/sunos5-5.h
includes/cf/ultrix.h
includes/dhcpd.h
server/dhcpd.c
server/dhcpd.conf.5
server/stables.c

index fc97c2dd4b7041a9c75676e0d8ca43ae712932a1..cc64dfdda6b3d7a6498ef1818d3287bd76be4e34 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -54,6 +54,10 @@ suggested fixes to <dhcp-users@isc.org>.
 
                        Changes since 4.0.0b1
 
+- Use different paths for PID and lease files when running in DHCPv4
+  or DHCPv6 mode, so that servers for both protcols can be run
+  simultaneously on a single interface.
+
 - Fixed a buffer overflow error which could have allowed a denial
   of service under unusual server configurations
 
index c2f4997f9e96ee81ce921c2327dba790f7d97604..2b1008d9efc9517cc56f08ed6d936d6fe5c8a24c 100644 (file)
@@ -1,4 +1,4 @@
-static const char rcsid[] = "$Header: /tmp/cvstest/DHCP/dst/dst_support.c,v 1.1 2001/02/22 07:22:08 mellon Exp $";
+static const char rcsid[] = "$Header: /tmp/cvstest/DHCP/dst/dst_support.c,v 1.2 2007/10/27 19:15:32 each Exp $";
 
 
 /*
@@ -155,7 +155,7 @@ dst_s_conv_bignum_b64_to_u8(const char **buf,
        }
        bp = strchr(*buf, '\n');        /* find length of input line */
        if (bp != NULL)
-               *bp = (u_char) NULL;
+               *bp = '\0';
 
        blen = b64_pton(*buf, bstr, sizeof(bstr));
        if (blen <= 0) {
index 21a7c720a203edbe39d60c559f8af7116d55827f..2690e5adfd91f467b04dda9f2dcdb00bf67cdac8 100644 (file)
@@ -64,6 +64,9 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/etc/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/etc/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
 #endif
index 38ad33a8bbc0392f58686b22e63ddbeed2ec56fc..f8815d90b1f537473a1fb2ce25ab35ed875e9088 100644 (file)
@@ -80,6 +80,9 @@ typedef unsigned long u_int64_t;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/var/run/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/var/run/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
 #endif
index 15654306c320f0493dcf44cc488b4f4307a5e722..18692e3aa046d6935546a1964790dc0293b06c77 100644 (file)
@@ -60,9 +60,15 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/var/run/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/var/run/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCPD_DB
 #define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
 #endif
+#ifndef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB "/var/db/dhcpd6.leases"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
 #endif
index 78119ad3528e8759078729a823971c566c940fcc..c6c2b4e6eb1c479d3ea8dcc67013d3995fe46502 100644 (file)
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "//e/etc/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "//e/etc/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCPD_DB
 #define _PATH_DHCPD_DB "//e/etc/dhcpd.leases"
 #endif
+#ifndef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB "//e/etc/dhcpd6.leases"
+#endif
 #ifndef _PATH_DHCPD_CONF
 #define _PATH_DHCPD_CONF "//e/etc/dhcpd.conf"
 #endif
index 5bb00908639f6e11e842428a39e56a5e90071001..ffe8b03e87b0aabc708ac204d8cde6b10702852d 100644 (file)
@@ -67,9 +67,15 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/var/run/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/var/run/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCPD_DB
 #define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
 #endif
+#ifndef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB        "/var/db/dhcpd6.leases"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
 #endif
index dc6e178372b263d2e18585d66d7ed577cb8e91ea..62271f682f0fa8e0f670a7398264c01beeba8089 100644 (file)
@@ -62,6 +62,9 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/etc/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/etc/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
 #endif
index 7dbaa7eff30cf3f302257413242d2352e8a19d3f..b5321ee6e53148a20115f3704bad58361aaeb6d8 100644 (file)
@@ -50,11 +50,19 @@ extern int h_errno;
 #include <net/if_arp.h>
 
 #define _PATH_DHCPD_CONF "/usr/local/etc/dhcpd.conf"
-#define _PATH_DHCPD_DB   "/usr/local/etc/dhcp/dhcpd.leases"
 
+#ifndef _PATH_DHCPD_DB
+#define _PATH_DHCPD_DB   "/usr/local/etc/dhcp/dhcpd.leases"
+#endif
+#ifndef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB   "/usr/local/etc/dhcp/dhcpd6.leases"
+#endif
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/etc/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/etc/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
 #endif
index 09aa7e3d07525954c40a15f70ac9eb8fc13f2a8f..d37873fca9d0054207f77b21be19babf10ab508b 100644 (file)
@@ -85,6 +85,9 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_DB
 #define _PATH_DHCPD_DB         "/var/state/dhcp/dhcpd.leases"
 #endif
+#ifndef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB                "/var/state/dhcp/dhcpd6.leases"
+#endif
 
 #ifndef _PATH_DHCLIENT_DB
 #define _PATH_DHCLIENT_DB      "/var/state/dhcp/dhclient.leases"
index 883e1b9a506aa4e02f61a7492523fb2371bc4a24..df892d0273f788c961ecacb119b0dbc0a58a007b 100644 (file)
@@ -63,9 +63,15 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/var/run/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/var/run/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCPD_DB
 #define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
 #endif
+#ifndef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB "/var/db/dhcpd6.leases"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
 #endif
index d39e01151d60502ddcaceb88303ef1b441c00f40..b13525c36860bd63145cd874321c8358a231b38e 100644 (file)
@@ -75,6 +75,10 @@ extern int h_errno;
 # define _PATH_DHCPD_PID       "/etc/dhcpd.pid"
 #endif
 
+#if !defined (_PATH_DHCPD6_PID)
+# define _PATH_DHCPD6_PID      "/etc/dhcpd6.pid"
+#endif
+
 #if !defined (_PATH_DHCLIENT_PID)
 # define _PATH_DHCLIENT_PID    "/etc/dhclient.pid"
 #endif
index ce9b5b87e8940976c6092e21f726497ce6c93b44..f14177cdcb531f014f2fa3df673531f1ae946409 100644 (file)
@@ -63,9 +63,15 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/var/run/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/var/run/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCPD_DB
 #define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
 #endif
+#ifndef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB "/var/db/dhcpd6.leases"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
 #endif
index acde1d90542dd0266f467853c090275ea635f46e..f2ad027c3dc2051c8572067eab53f5133c1894f3 100644 (file)
@@ -66,6 +66,9 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/etc/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/etc/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
 #endif
index 27844de9d310de0b17b579c40dbad7f81da88c66..6e980e3d4c671f24bbaa7ecece3ade519fc7128c 100644 (file)
@@ -63,9 +63,15 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/var/run/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/var/run/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCPD_DB
 #define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
 #endif
+#ifndef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB "/var/db/dhcpd6.leases"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
 #endif
index b3ae18706f6b15e96258ac9a4a77c313794ae801..e9ba569a5097f1355303d11e2eb3f4d0c799ff24 100644 (file)
@@ -127,9 +127,15 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/etc/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/etc/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
 #endif
+#ifndef _PATH_DHCLIENT6_PID
+#define _PATH_DHCLIENT6_PID "/etc/dhclient6.pid"
+#endif
 #ifndef _PATH_DHCRELAY_PID
 #define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid"
 #endif
index f2798fc67a61f94400c5d4c3200060012c622ef4..3554cc2c9aa70a6301417b6a05fcdf2b5fe8be2a 100644 (file)
@@ -80,6 +80,9 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/etc/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID       "/etc/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID  "/etc/dhclient.pid"
 #endif
@@ -92,6 +95,9 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_DB
 #define _PATH_DHCPD_DB      "/etc/dhcpd.leases"
 #endif
+#ifndef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB      "/etc/dhcpd6.leases"
+#endif
 #ifndef _PATH_DHCLIENT_DB
 #define _PATH_DHCLIENT_DB   "/etc/dhclient.leases"
 #endif
index 2c6184504c7c9a23e4c41fde4a10ce959c7332e5..6aaf9e66f6ab567d2e4ab78837c90ba763a5484b 100644 (file)
@@ -99,6 +99,9 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/etc/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/etc/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
 #endif
index 445ce53e134179be40614e52e372ff2e4b30e2f2..e19b28c029edd61f0490860a21b018cdd6b48834 100644 (file)
@@ -93,6 +93,9 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/etc/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/etc/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
 #endif
index 04caa87a9047a1ad278319c23b299532cdf42fb6..d368bf4cb35bd53341b65242269c791f4074d173 100644 (file)
@@ -52,6 +52,9 @@ extern int h_errno;
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID        "/etc/dhcpd.pid"
 #endif
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID "/etc/dhcpd6.pid"
+#endif
 #ifndef _PATH_DHCLIENT_PID
 #define _PATH_DHCLIENT_PID "/etc/dhclient.pid"
 #endif
index 7c7ddba94de4faf0440956a60209299424a27c52..2df77df0f3a278b4d755fbb2703e9ee555ff2c3a 100644 (file)
@@ -618,6 +618,8 @@ struct lease_state {
 #define SV_DO_REVERSE_UPDATES          51
 #define SV_FQDN_REPLY                  52
 #define SV_PREFER_LIFETIME             53
+#define SV_DHCPV6_LEASE_FILE_NAME       54
+#define SV_DHCPV6_PID_FILE_NAME         55
 
 #if !defined (DEFAULT_PING_TIMEOUT)
 # define DEFAULT_PING_TIMEOUT 1
@@ -1224,9 +1226,14 @@ typedef unsigned char option_mask [16];
 #define _PATH_DHCPD_CONF       "dhcpd.conf"
 #undef _PATH_DHCPD_DB
 #define _PATH_DHCPD_DB         "dhcpd.leases"
+#undef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB                "dhcpd6.leases"
 #undef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID                "dhcpd.pid"
+#undef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID       "dhcpd6.pid"
 #else /* !DEBUG */
+
 #ifndef _PATH_DHCPD_CONF
 #define _PATH_DHCPD_CONF       "/etc/dhcpd.conf"
 #endif /* DEBUG */
@@ -1235,11 +1242,20 @@ typedef unsigned char option_mask [16];
 #define _PATH_DHCPD_DB         LOCALSTATEDIR"/db/dhcpd.leases"
 #endif
 
+#ifndef _PATH_DHCPD6_DB
+#define _PATH_DHCPD6_DB                LOCALSTATEDIR"/db/dhcpd6.leases"
+#endif
+
 #ifndef _PATH_DHCPD_PID
 #define _PATH_DHCPD_PID                LOCALSTATEDIR"/run/dhcpd.pid"
 #endif
+
+#ifndef _PATH_DHCPD6_PID
+#define _PATH_DHCPD6_PID       LOCALSTATEDIR"/run/dhcpd6.pid"
 #endif
 
+#endif /* DEBUG */
+
 #ifndef _PATH_DHCLIENT_CONF
 #define _PATH_DHCLIENT_CONF    "/etc/dhclient.conf"
 #endif
index d61e31b0c2d7df691dc3d766fa7eb5d7bd95a277..93dc2c76edec79cac840dadf26e561a0e7b3f466 100644 (file)
@@ -314,6 +314,7 @@ main(int argc, char **argv) {
                } else if (!strcmp (argv [i], "-q")) {
                        quiet = 1;
                        quiet_interface_discovery = 1;
+#ifdef DHCPv6
                } else if (!strcmp(argv[i], "-4")) {
                        if (local_family_set && (local_family != AF_INET)) {
                                log_fatal("Server cannot run in both IPv4 and "
@@ -328,6 +329,7 @@ main(int argc, char **argv) {
                        }
                        local_family = AF_INET6;
                        local_family_set = 1;
+#endif /* DHCPv6 */
                } else if (!strcmp (argv [i], "--version")) {
                        log_info("isc-dhcpd-%s", PACKAGE_VERSION);
                        exit (0);
@@ -366,12 +368,33 @@ main(int argc, char **argv) {
        if (!no_dhcpd_conf && (s = getenv ("PATH_DHCPD_CONF"))) {
                path_dhcpd_conf = s;
        }
-       if (!no_dhcpd_db && (s = getenv ("PATH_DHCPD_DB"))) {
-               path_dhcpd_db = s;
-       }
-       if (!no_dhcpd_pid && (s = getenv ("PATH_DHCPD_PID"))) {
-               path_dhcpd_pid = s;
-       }
+
+#ifdef DHCPv6
+        if (local_family == AF_INET6) {
+                /* DHCPv6: override DHCPv4 lease and pid filenames */
+               if (!no_dhcpd_db) {
+                        if ((s = getenv ("PATH_DHCPD6_DB")))
+                               path_dhcpd_db = s;
+                        else
+                               path_dhcpd_db = _PATH_DHCPD6_DB;
+               }
+               if (!no_dhcpd_pid) {
+                        if ((s = getenv ("PATH_DHCPD6_PID")))
+                               path_dhcpd_pid = s;
+                        else
+                               path_dhcpd_pid = _PATH_DHCPD6_PID;
+               }
+        } else
+#else /* !DHCPv6 */
+        {
+               if (!no_dhcpd_db && (s = getenv ("PATH_DHCPD_DB"))) {
+                       path_dhcpd_db = s;
+               }
+               if (!no_dhcpd_pid && (s = getenv ("PATH_DHCPD_PID"))) {
+                       path_dhcpd_pid = s;
+               }
+        }
+#endif /* DHCPv6 */
 
         /*
          * convert relative path names to absolute, for files that need
@@ -738,7 +761,7 @@ void postconf_initialization (int quiet)
                data_string_forget (&db, MDL);
                path_dhcpd_db = s;
        }
-       
+
        oc = lookup_option (&server_universe, options, SV_PID_FILE_NAME);
        if (oc &&
            evaluate_option_cache (&db, (struct packet *)0,
@@ -754,6 +777,44 @@ void postconf_initialization (int quiet)
                path_dhcpd_pid = s;
        }
 
+#ifdef DHCPv6
+        if (local_family == AF_INET6) {
+                /*
+                 * Override lease file name with dhcpv6 lease file name,
+                 * if it was set; then, do the same with the pid file name
+                 */
+                oc = lookup_option(&server_universe, options,
+                                   SV_DHCPV6_LEASE_FILE_NAME);
+                if (oc &&
+                    evaluate_option_cache(&db, NULL, NULL, NULL,
+                                         options, NULL, &global_scope,
+                                          oc, MDL)) {
+                        s = dmalloc (db.len + 1, MDL);
+                        if (!s)
+                                log_fatal ("no memory for lease db filename.");
+                        memcpy (s, db.data, db.len);
+                        s [db.len] = 0;
+                        data_string_forget (&db, MDL);
+                        path_dhcpd_db = s;
+                }
+
+                oc = lookup_option(&server_universe, options,
+                                   SV_DHCPV6_PID_FILE_NAME);
+                if (oc &&
+                    evaluate_option_cache(&db, NULL, NULL, NULL,
+                                         options, NULL, &global_scope,
+                                          oc, MDL)) {
+                        s = dmalloc (db.len + 1, MDL);
+                        if (!s)
+                                log_fatal ("no memory for lease db filename.");
+                        memcpy (s, db.data, db.len);
+                        s [db.len] = 0;
+                        data_string_forget (&db, MDL);
+                        path_dhcpd_pid = s;
+                }
+        }
+#endif /* DHCPv6 */
+
        omapi_port = -1;
        oc = lookup_option (&server_universe, options, SV_OMAPI_PORT);
        if (oc &&
@@ -963,7 +1024,11 @@ usage(void) {
        log_info(arr);
 
        log_fatal("Usage: dhcpd [-p <UDP port #>] [-f] [-d] [-q] [-t|-T]\n"
+#ifdef DHCPv6
                  "             [-4|-6] [-cf config-file] [-lf lease-file]\n"
+#else /* !DHCPv6 */
+                 "             [-cf config-file] [-lf lease-file]\n"
+#endif /* DHCPv6 */
 #if defined (TRACING)
                  "             [-tf trace-output-file]\n"
                  "             [-play trace-input-file]\n"
index de7e8ab254dacea9f4c3475aef01676e04f87da0..f34eef5512a51936262386f779a7a1c512a851f8 100644 (file)
@@ -28,7 +28,7 @@
 .\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
 .\" ``http://www.nominum.com''.
 .\"
-.\" $Id: dhcpd.conf.5,v 1.88 2007/09/17 10:13:07 shane Exp $
+.\" $Id: dhcpd.conf.5,v 1.89 2007/10/27 19:15:36 each Exp $
 .\"
 .TH dhcpd.conf 5
 .SH NAME
@@ -2230,7 +2230,36 @@ statement
 should be the name of the DHCP server's lease file.   By default, this
 is DBDIR/dhcpd.leases.   This statement \fBmust\fR appear in the outer
 scope of the configuration file - if it appears in some other scope,
-it will have no effect.
+it will have no effect.  Furthermore, it has no effect if overridden
+by the
+.B -lf
+flag or the
+.B PATH_DHCPD_DB
+environment variable.
+.RE
+.PP
+The
+.I dhcpv6-lease-file-name
+statement
+.RS 0.25i
+.PP
+.B dhcpv6-lease-file-name \fIname\fB;\fR
+.PP
+.I Name
+is the name of the lease file to use if and only if the server is running
+in DHCPv6 mode.  By default, this is DBDIR/dhcpd6.leases.  This statement,
+like
+.I lease-file-name,
+\fBmust\fR appear in the outer scope of the configuration file.  It
+has no effect if overridden by the
+.B -lf
+flag or the
+.B PATH_DHCPD6_DB
+environment variable.  If
+.I dhcpv6-lease-file-name
+is not specified, but
+.I lease-file-name
+is, the latter value will be used.
 .RE
 .PP
 The
@@ -2422,8 +2451,36 @@ statement
 should be the name of the DHCP server's process ID file.   This is the
 file in which the DHCP server's process ID is stored when the server
 starts.   By default, this is RUNDIR/dhcpd.pid.   Like the
-lease-file-name statement, this statement must appear in the outer scope
-of the configuration file.
+.I lease-file-name
+statement, this statement must appear in the outer scope
+of the configuration file.  It has no effect if overridden by the
+.B -pf
+flag or the
+.B PATH_DHCPD_PID
+environment variable.
+.PP
+The
+.I dhcpv6-pid-file-name
+statement
+.RS 0.25i
+.PP
+.B dhcpv6-pid-file-name \fIname\fB;\fR
+.PP
+.I Name
+is the name of the pid file to use if and only if the server is running
+in DHCPv6 mode.  By default, this is DBDIR/dhcpd6.pid.  This statement,
+like
+.I pid-file-name,
+\fBmust\fR appear in the outer scope of the configuration file.  It
+has no effect if overridden by the
+.B -pf
+flag or the
+.B PATH_DHCPD6_PID
+environment variable.  If
+.I dhcpv6-pid-file-name
+is not specified, but
+.I pid-file-name
+is, the latter value will be used.
 .RE
 .PP
 The
index 4e67f8e1f5b29da50eccdc5a6d549ca509fff844..ef50efb6c900ab11dd7e80f7ec1ffd6f6087a4a4 100644 (file)
@@ -235,6 +235,8 @@ static struct option server_options[] = {
        { "do-reverse-updates", "f",            &server_universe,  51, 1 },
        { "fqdn-reply", "f",                    &server_universe,  52, 1 },
        { "preferred-lifetime", "T",            &server_universe,  53, 1 },
+       { "dhcpv6-lease-file-name", "t",        &server_universe,  54, 1 },
+       { "dhcpv6-pid-file-name", "t",          &server_universe,  55, 1 },
        { NULL, NULL, NULL, 0, 0 }
 };