diff --git a/.cvsignore b/.cvsignore index 89152cd..23c3f92 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -dhcp-4.1.0p1.tar.gz -ldap-for-dhcp-4.1.0-5.tar.gz +dhcp-4.1.1.tar.gz +ldap-for-dhcp-4.1.1-1.tar.gz diff --git a/dhcp-4.1.0-64_bit_lease_parse.patch b/dhcp-4.1.0-64_bit_lease_parse.patch deleted file mode 100644 index 91fe6ab..0000000 --- a/dhcp-4.1.0-64_bit_lease_parse.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up dhcp-4.1.0/common/parse.c.64-bit_lease_parse dhcp-4.1.0/common/parse.c ---- dhcp-4.1.0/common/parse.c.64-bit_lease_parse 2008-10-08 06:26:42.000000000 -1000 -+++ dhcp-4.1.0/common/parse.c 2009-07-09 16:22:05.000000000 -1000 -@@ -905,8 +905,8 @@ TIME - parse_date_core(cfile) - struct parse *cfile; - { -- int guess; -- int tzoff, wday, year, mon, mday, hour, min, sec; -+ TIME guess; -+ long int tzoff, wday, year, mon, mday, hour, min, sec; - const char *val; - enum dhcp_token token; - static int months [11] = { 31, 59, 90, 120, 151, 181, diff --git a/dhcp-4.1.0-CLOEXEC.patch b/dhcp-4.1.0-CLOEXEC.patch deleted file mode 100644 index 14896de..0000000 --- a/dhcp-4.1.0-CLOEXEC.patch +++ /dev/null @@ -1,446 +0,0 @@ -diff -up dhcp-4.1.0/client/clparse.c.cloexec dhcp-4.1.0/client/clparse.c ---- dhcp-4.1.0/client/clparse.c.cloexec 2009-01-06 11:56:11.000000000 -1000 -+++ dhcp-4.1.0/client/clparse.c 2009-01-06 12:04:48.000000000 -1000 -@@ -226,7 +226,7 @@ int read_client_conf_file (const char *n - int token; - isc_result_t status; - -- if ((file = open (name, O_RDONLY)) < 0) -+ if ((file = open (name, O_RDONLY | O_CLOEXEC)) < 0) - return uerr2isc (errno); - - cfile = NULL; -@@ -263,7 +263,7 @@ void read_client_leases () - - /* Open the lease file. If we can't open it, just return - - we can safely trust the server to remember our state. */ -- if ((file = open (path_dhclient_db, O_RDONLY)) < 0) -+ if ((file = open (path_dhclient_db, O_RDONLY | O_CLOEXEC)) < 0) - return; - - cfile = NULL; -diff -up dhcp-4.1.0/client/dhclient.c.cloexec dhcp-4.1.0/client/dhclient.c ---- dhcp-4.1.0/client/dhclient.c.cloexec 2009-01-06 11:56:10.000000000 -1000 -+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 12:04:01.000000000 -1000 -@@ -135,11 +135,11 @@ main(int argc, char **argv) { - /* Make sure that file descriptors 0 (stdin), 1, (stdout), and - 2 (stderr) are open. To do this, we assume that when we - open a file the lowest available file descriptor is used. */ -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 0) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 1) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 2) - log_perror = 0; /* No sense logging to /dev/null. */ - else if (fd != -1) -@@ -465,7 +465,7 @@ main(int argc, char **argv) { - int e; - - oldpid = 0; -- if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) { -+ if ((pidfd = fopen(path_dhclient_pid, "re")) != NULL) { - e = fscanf(pidfd, "%ld\n", &temp); - oldpid = (pid_t)temp; - -@@ -507,7 +507,7 @@ main(int argc, char **argv) { - strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx); - sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name); - -- if ((pidfd = fopen(new_path_dhclient_pid, "r")) != NULL) { -+ if ((pidfd = fopen(new_path_dhclient_pid, "re")) != NULL) { - e = fscanf(pidfd, "%ld\n", &temp); - oldpid = (pid_t)temp; - -@@ -532,7 +532,7 @@ main(int argc, char **argv) { - int dhc_running = 0; - char procfn[256] = ""; - -- if ((pidfp = fopen(path_dhclient_pid, "r")) != NULL) { -+ if ((pidfp = fopen(path_dhclient_pid, "re")) != NULL) { - if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) { - snprintf(procfn,256,"/proc/%u",dhcpid); - dhc_running = (access(procfn, F_OK) == 0); -@@ -2908,7 +2908,7 @@ void rewrite_client_leases () - - if (leaseFile != NULL) - fclose (leaseFile); -- leaseFile = fopen (path_dhclient_db, "w"); -+ leaseFile = fopen (path_dhclient_db, "we"); - if (leaseFile == NULL) { - log_error ("can't create %s: %m", path_dhclient_db); - return; -@@ -3012,7 +3012,7 @@ write_duid(struct data_string *duid) - return ISC_R_INVALIDARG; - - if (leaseFile == NULL) { /* XXX? */ -- leaseFile = fopen(path_dhclient_db, "w"); -+ leaseFile = fopen(path_dhclient_db, "we"); - if (leaseFile == NULL) { - log_error("can't create %s: %m", path_dhclient_db); - return ISC_R_IOERROR; -@@ -3192,7 +3192,7 @@ int write_client_lease (client, lease, r - return 1; - - if (leaseFile == NULL) { /* XXX */ -- leaseFile = fopen (path_dhclient_db, "w"); -+ leaseFile = fopen (path_dhclient_db, "we"); - if (leaseFile == NULL) { - log_error ("can't create %s: %m", path_dhclient_db); - return 0; -@@ -3638,9 +3638,9 @@ void go_daemon () - close(2); - - /* Reopen them on /dev/null. */ -- open("/dev/null", O_RDWR); -- open("/dev/null", O_RDWR); -- open("/dev/null", O_RDWR); -+ open("/dev/null", O_RDWR | O_CLOEXEC); -+ open("/dev/null", O_RDWR | O_CLOEXEC); -+ open("/dev/null", O_RDWR | O_CLOEXEC); - - write_client_pid_file (); - -@@ -3652,14 +3652,14 @@ void write_client_pid_file () - FILE *pf; - int pfdesc; - -- pfdesc = open (path_dhclient_pid, O_CREAT | O_TRUNC | O_WRONLY, 0644); -+ pfdesc = open (path_dhclient_pid, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644); - - if (pfdesc < 0) { - log_error ("Can't create %s: %m", path_dhclient_pid); - return; - } - -- pf = fdopen (pfdesc, "w"); -+ pf = fdopen (pfdesc, "we"); - if (!pf) - log_error ("Can't fdopen %s: %m", path_dhclient_pid); - else { -diff -up dhcp-4.1.0/common/bpf.c.cloexec dhcp-4.1.0/common/bpf.c ---- dhcp-4.1.0/common/bpf.c.cloexec 2009-01-06 11:56:11.000000000 -1000 -+++ dhcp-4.1.0/common/bpf.c 2009-01-06 11:56:11.000000000 -1000 -@@ -94,7 +94,7 @@ int if_register_bpf (info) - for (b = 0; 1; b++) { - /* %Audit% 31 bytes max. %2004.06.17,Safe% */ - sprintf(filename, BPF_FORMAT, b); -- sock = open (filename, O_RDWR, 0); -+ sock = open (filename, O_RDWR | O_CLOEXEC, 0); - if (sock < 0) { - if (errno == EBUSY) { - continue; -diff -up dhcp-4.1.0/common/discover.c.cloexec dhcp-4.1.0/common/discover.c ---- dhcp-4.1.0/common/discover.c.cloexec 2008-08-29 07:48:57.000000000 -1000 -+++ dhcp-4.1.0/common/discover.c 2009-01-06 11:56:11.000000000 -1000 -@@ -409,7 +409,7 @@ begin_iface_scan(struct iface_conf_list - int len; - int i; - -- ifaces->fp = fopen("/proc/net/dev", "r"); -+ ifaces->fp = fopen("/proc/net/dev", "re"); - if (ifaces->fp == NULL) { - log_error("Error opening '/proc/net/dev' to list interfaces"); - return 0; -@@ -443,7 +443,7 @@ begin_iface_scan(struct iface_conf_list - } - - #ifdef DHCPv6 -- ifaces->fp6 = fopen("/proc/net/if_inet6", "r"); -+ ifaces->fp6 = fopen("/proc/net/if_inet6", "re"); - if (ifaces->fp6 == NULL) { - log_error("Error opening '/proc/net/if_inet6' to " - "list IPv6 interfaces; %m"); -diff -up dhcp-4.1.0/common/dlpi.c.cloexec dhcp-4.1.0/common/dlpi.c ---- dhcp-4.1.0/common/dlpi.c.cloexec 2009-01-06 11:56:11.000000000 -1000 -+++ dhcp-4.1.0/common/dlpi.c 2009-01-06 11:56:11.000000000 -1000 -@@ -795,7 +795,7 @@ dlpiopen(const char *ifname) { - } - *dp = '\0'; - -- return open (devname, O_RDWR, 0); -+ return open (devname, O_RDWR | O_CLOEXEC, 0); - } - - /* -diff -up dhcp-4.1.0/common/nit.c.cloexec dhcp-4.1.0/common/nit.c ---- dhcp-4.1.0/common/nit.c.cloexec 2009-01-06 11:56:11.000000000 -1000 -+++ dhcp-4.1.0/common/nit.c 2009-01-06 11:56:11.000000000 -1000 -@@ -81,7 +81,7 @@ int if_register_nit (info) - struct strioctl sio; - - /* Open a NIT device */ -- sock = open ("/dev/nit", O_RDWR); -+ sock = open ("/dev/nit", O_RDWR | O_CLOEXEC); - if (sock < 0) - log_fatal ("Can't open NIT device for %s: %m", info -> name); - -diff -up dhcp-4.1.0/common/resolv.c.cloexec dhcp-4.1.0/common/resolv.c ---- dhcp-4.1.0/common/resolv.c.cloexec 2008-03-07 10:12:44.000000000 -1000 -+++ dhcp-4.1.0/common/resolv.c 2009-01-06 12:05:17.000000000 -1000 -@@ -49,7 +49,7 @@ void read_resolv_conf (parse_time) - struct domain_search_list *dp, *dl, *nd; - isc_result_t status; - -- if ((file = open (path_resolv_conf, O_RDONLY)) < 0) { -+ if ((file = open (path_resolv_conf, O_RDONLY | O_CLOEXEC)) < 0) { - log_error ("Can't open %s: %m", path_resolv_conf); - return; - } -diff -up dhcp-4.1.0/common/upf.c.cloexec dhcp-4.1.0/common/upf.c ---- dhcp-4.1.0/common/upf.c.cloexec 2009-01-06 11:56:11.000000000 -1000 -+++ dhcp-4.1.0/common/upf.c 2009-01-06 11:56:11.000000000 -1000 -@@ -77,7 +77,7 @@ int if_register_upf (info) - /* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */ - sprintf(filename, "/dev/pf/pfilt%d", b); - -- sock = open (filename, O_RDWR, 0); -+ sock = open (filename, O_RDWR | O_CLOEXEC, 0); - if (sock < 0) { - if (errno == EBUSY) { - continue; -diff -up dhcp-4.1.0/dst/dst_api.c.cloexec dhcp-4.1.0/dst/dst_api.c ---- dhcp-4.1.0/dst/dst_api.c.cloexec 2007-11-30 11:51:43.000000000 -1000 -+++ dhcp-4.1.0/dst/dst_api.c 2009-01-06 11:56:11.000000000 -1000 -@@ -436,7 +436,7 @@ dst_s_write_private_key(const DST_KEY *k - PRIVATE_KEY, PATH_MAX); - - /* Do not overwrite an existing file */ -- if ((fp = dst_s_fopen(file, "w", 0600)) != NULL) { -+ if ((fp = dst_s_fopen(file, "we", 0600)) != NULL) { - int nn; - if ((nn = fwrite(encoded_block, 1, len, fp)) != len) { - EREPORT(("dst_write_private_key(): Write failure on %s %d != %d errno=%d\n", -@@ -493,7 +493,7 @@ dst_s_read_public_key(const char *in_nam - * flags, proto, alg stored as decimal (or hex numbers FIXME). - * (FIXME: handle parentheses for line continuation.) - */ -- if ((fp = dst_s_fopen(name, "r", 0)) == NULL) { -+ if ((fp = dst_s_fopen(name, "re", 0)) == NULL) { - EREPORT(("dst_read_public_key(): Public Key not found %s\n", - name)); - return (NULL); -@@ -615,7 +615,7 @@ dst_s_write_public_key(const DST_KEY *ke - return (0); - } - /* create public key file */ -- if ((fp = dst_s_fopen(filename, "w+", 0644)) == NULL) { -+ if ((fp = dst_s_fopen(filename, "w+e", 0644)) == NULL) { - EREPORT(("DST_write_public_key: open of file:%s failed (errno=%d)\n", - filename, errno)); - return (0); -@@ -849,7 +849,7 @@ dst_s_read_private_key_file(char *name, - return (0); - } - /* first check if we can find the key file */ -- if ((fp = dst_s_fopen(filename, "r", 0)) == NULL) { -+ if ((fp = dst_s_fopen(filename, "re", 0)) == NULL) { - EREPORT(("dst_s_read_private_key_file: Could not open file %s in directory %s\n", - filename, dst_path[0] ? dst_path : - (char *) getcwd(NULL, PATH_MAX - 1))); -diff -up dhcp-4.1.0/dst/prandom.c.cloexec dhcp-4.1.0/dst/prandom.c ---- dhcp-4.1.0/dst/prandom.c.cloexec 2007-11-30 11:51:43.000000000 -1000 -+++ dhcp-4.1.0/dst/prandom.c 2009-01-06 11:56:11.000000000 -1000 -@@ -267,7 +267,7 @@ get_dev_random(u_char *output, unsigned - - s = stat("/dev/random", &st); - if (s == 0 && S_ISCHR(st.st_mode)) { -- if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK)) != -1) { -+ if ((fd = open("/dev/random", O_RDONLY | O_NONBLOCK | O_CLOEXEC)) != -1) { - if ((n = read(fd, output, size)) < 0) - n = 0; - close(fd); -@@ -478,7 +478,7 @@ digest_file(dst_work *work) - work->file_digest = dst_free_key(work->file_digest); - return (0); - } -- if ((fp = fopen(name, "r")) == NULL) -+ if ((fp = fopen(name, "re")) == NULL) - return (0); - for (no = 0; (i = fread(buf, sizeof(*buf), sizeof(buf), fp)) > 0; - no += i) -diff -up dhcp-4.1.0/minires/res_init.c.cloexec dhcp-4.1.0/minires/res_init.c ---- dhcp-4.1.0/minires/res_init.c.cloexec 2008-02-28 11:21:56.000000000 -1000 -+++ dhcp-4.1.0/minires/res_init.c 2009-01-06 11:56:11.000000000 -1000 -@@ -233,7 +233,7 @@ minires_vinit(res_state statp, int prein - (line[sizeof(name) - 1] == ' ' || \ - line[sizeof(name) - 1] == '\t')) - -- if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) { -+ if ((fp = fopen(_PATH_RESCONF, "re")) != NULL) { - /* read the config file */ - while (fgets(buf, sizeof(buf), fp) != NULL) { - /* skip comments */ -diff -up dhcp-4.1.0/minires/res_query.c.cloexec dhcp-4.1.0/minires/res_query.c ---- dhcp-4.1.0/minires/res_query.c.cloexec 2008-02-28 11:21:56.000000000 -1000 -+++ dhcp-4.1.0/minires/res_query.c 2009-01-06 11:56:11.000000000 -1000 -@@ -379,7 +379,7 @@ res_hostalias(const res_state statp, con - if (statp->options & RES_NOALIASES) - return (NULL); - file = getenv("HOSTALIASES"); -- if (file == NULL || (fp = fopen(file, "r")) == NULL) -+ if (file == NULL || (fp = fopen(file, "re")) == NULL) - return (NULL); - setbuf(fp, NULL); - buf[sizeof(buf) - 1] = '\0'; -diff -up dhcp-4.1.0/omapip/trace.c.cloexec dhcp-4.1.0/omapip/trace.c ---- dhcp-4.1.0/omapip/trace.c.cloexec 2007-07-12 20:43:42.000000000 -1000 -+++ dhcp-4.1.0/omapip/trace.c 2009-01-06 11:56:11.000000000 -1000 -@@ -140,10 +140,10 @@ isc_result_t trace_begin (const char *fi - return ISC_R_INVALIDARG; - } - -- traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL, 0600); -+ traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL | O_CLOEXEC, 0600); - if (traceoutfile < 0 && errno == EEXIST) { - log_error ("WARNING: Overwriting trace file \"%s\"", filename); -- traceoutfile = open (filename, O_WRONLY | O_EXCL, 0600); -+ traceoutfile = open (filename, O_WRONLY | O_EXCL | O_CLOEXEC, 0600); - } - - if (traceoutfile < 0) { -@@ -429,7 +429,7 @@ void trace_file_replay (const char *file - isc_result_t result; - int len; - -- traceinfile = fopen (filename, "r"); -+ traceinfile = fopen (filename, "re"); - if (!traceinfile) { - log_error ("Can't open tracefile %s: %m", filename); - return; -diff -up dhcp-4.1.0/relay/dhcrelay.c.cloexec dhcp-4.1.0/relay/dhcrelay.c ---- dhcp-4.1.0/relay/dhcrelay.c.cloexec 2008-11-12 13:22:14.000000000 -1000 -+++ dhcp-4.1.0/relay/dhcrelay.c 2009-01-06 12:06:23.000000000 -1000 -@@ -174,11 +174,11 @@ main(int argc, char **argv) { - /* Make sure that file descriptors 0(stdin), 1,(stdout), and - 2(stderr) are open. To do this, we assume that when we - open a file the lowest available file descriptor is used. */ -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 0) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 1) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 2) - log_perror = 0; /* No sense logging to /dev/null. */ - else if (fd != -1) -@@ -511,12 +511,12 @@ main(int argc, char **argv) { - exit(0); - - pfdesc = open(path_dhcrelay_pid, -- O_CREAT | O_TRUNC | O_WRONLY, 0644); -+ O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644); - - if (pfdesc < 0) { - log_error("Can't create %s: %m", path_dhcrelay_pid); - } else { -- pf = fdopen(pfdesc, "w"); -+ pf = fdopen(pfdesc, "we"); - if (!pf) - log_error("Can't fdopen %s: %m", - path_dhcrelay_pid); -diff -up dhcp-4.1.0/server/confpars.c.cloexec dhcp-4.1.0/server/confpars.c ---- dhcp-4.1.0/server/confpars.c.cloexec 2009-01-06 11:56:10.000000000 -1000 -+++ dhcp-4.1.0/server/confpars.c 2009-01-06 11:56:11.000000000 -1000 -@@ -116,7 +116,7 @@ isc_result_t read_conf_file (const char - } - #endif - -- if ((file = open (filename, O_RDONLY)) < 0) { -+ if ((file = open (filename, O_RDONLY | O_CLOEXEC)) < 0) { - if (leasep) { - log_error ("Can't open lease database %s: %m --", - path_dhcpd_db); -diff -up dhcp-4.1.0/server/db.c.cloexec dhcp-4.1.0/server/db.c ---- dhcp-4.1.0/server/db.c.cloexec 2008-03-31 03:49:45.000000000 -1000 -+++ dhcp-4.1.0/server/db.c 2009-01-06 11:56:11.000000000 -1000 -@@ -1021,7 +1021,7 @@ void db_startup (testp) - } - #endif - if (!testp) { -- db_file = fopen (path_dhcpd_db, "a"); -+ db_file = fopen (path_dhcpd_db, "ae"); - if (!db_file) - log_fatal ("Can't open %s for append.", path_dhcpd_db); - expire_all_pools (); -@@ -1069,12 +1069,12 @@ int new_lease_file () - path_dhcpd_db, (int)t) >= sizeof newfname) - log_fatal("new_lease_file: lease file path too long"); - -- db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT, 0664); -+ db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC, 0664); - if (db_fd < 0) { - log_error ("Can't create new lease file: %m"); - return 0; - } -- if ((new_db_file = fdopen(db_fd, "w")) == NULL) { -+ if ((new_db_file = fdopen(db_fd, "we")) == NULL) { - log_error("Can't fdopen new lease file: %m"); - close(db_fd); - goto fdfail; -diff -up dhcp-4.1.0/server/dhcpd.c.cloexec dhcp-4.1.0/server/dhcpd.c ---- dhcp-4.1.0/server/dhcpd.c.cloexec 2009-01-06 11:56:09.000000000 -1000 -+++ dhcp-4.1.0/server/dhcpd.c 2009-01-06 12:06:49.000000000 -1000 -@@ -266,11 +266,11 @@ main(int argc, char **argv) { - /* Make sure that file descriptors 0 (stdin), 1, (stdout), and - 2 (stderr) are open. To do this, we assume that when we - open a file the lowest available file descriptor is used. */ -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 0) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 1) -- fd = open("/dev/null", O_RDWR); -+ fd = open("/dev/null", O_RDWR | O_CLOEXEC); - if (fd == 2) - log_perror = 0; /* No sense logging to /dev/null. */ - else if (fd != -1) -@@ -779,7 +779,7 @@ main(int argc, char **argv) { - #endif /* PARANOIA */ - - /* Read previous pid file. */ -- if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) { -+ if ((i = open (path_dhcpd_pid, O_RDONLY | O_CLOEXEC)) >= 0) { - status = read(i, pbuf, (sizeof pbuf) - 1); - close (i); - if (status > 0) { -@@ -797,7 +797,7 @@ main(int argc, char **argv) { - } - - /* Write new pid file. */ -- if ((i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC, 0644)) >= 0) { -+ if ((i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644)) >= 0) { - sprintf(pbuf, "%d\n", (int) getpid()); - write(i, pbuf, strlen(pbuf)); - close(i); -@@ -823,9 +823,9 @@ main(int argc, char **argv) { - close(2); - - /* Reopen them on /dev/null. */ -- open("/dev/null", O_RDWR); -- open("/dev/null", O_RDWR); -- open("/dev/null", O_RDWR); -+ open("/dev/null", O_RDWR | O_CLOEXEC); -+ open("/dev/null", O_RDWR | O_CLOEXEC); -+ open("/dev/null", O_RDWR | O_CLOEXEC); - log_perror = 0; /* No sense logging to /dev/null. */ - - chdir("/"); -diff -up dhcp-4.1.0/server/ldap.c.cloexec dhcp-4.1.0/server/ldap.c ---- dhcp-4.1.0/server/ldap.c.cloexec 2009-01-06 11:56:09.000000000 -1000 -+++ dhcp-4.1.0/server/ldap.c 2009-01-06 11:56:11.000000000 -1000 -@@ -685,7 +685,7 @@ ldap_start (void) - - if (ldap_debug_file != NULL && ldap_debug_fd == -1) - { -- if ((ldap_debug_fd = open (ldap_debug_file, O_CREAT | O_TRUNC | O_WRONLY, -+ if ((ldap_debug_fd = open (ldap_debug_file, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, - S_IRUSR | S_IWUSR)) < 0) - log_error ("Error opening debug LDAP log file %s: %s", ldap_debug_file, - strerror (errno)); diff --git a/dhcp-4.1.0-CVE-2009-1892.patch b/dhcp-4.1.0-CVE-2009-1892.patch deleted file mode 100644 index c174ecc..0000000 --- a/dhcp-4.1.0-CVE-2009-1892.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up dhcp-4.1.0/server/dhcp.c.CVE-2009-1892 dhcp-4.1.0/server/dhcp.c ---- dhcp-4.1.0/server/dhcp.c.CVE-2009-1892 2008-11-03 08:13:58.000000000 -1000 -+++ dhcp-4.1.0/server/dhcp.c 2009-08-05 11:34:07.000000000 -1000 -@@ -1755,6 +1755,8 @@ void ack_lease (packet, lease, offer, wh - host_reference (&host, h, MDL); - } - if (!host) { -+ if (hp) -+ host_dereference (&hp, MDL); - find_hosts_by_haddr (&hp, - packet -> raw -> htype, - packet -> raw -> chaddr, diff --git a/dhcp-4.1.0-IFNAMSIZ.patch b/dhcp-4.1.0-IFNAMSIZ.patch deleted file mode 100644 index f57d8c0..0000000 --- a/dhcp-4.1.0-IFNAMSIZ.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up dhcp-4.1.0/server/dhcpd.c.ifnamsiz dhcp-4.1.0/server/dhcpd.c ---- dhcp-4.1.0/server/dhcpd.c.ifnamsiz 2009-04-20 16:35:30.000000000 -1000 -+++ dhcp-4.1.0/server/dhcpd.c 2009-04-20 15:45:15.000000000 -1000 -@@ -401,7 +401,7 @@ main(int argc, char **argv) { - log_fatal ("Insufficient memory to %s %s: %s", - "record interface", argv [i], - isc_result_totext (result)); -- strcpy (tmp -> name, argv [i]); -+ strncpy (tmp -> name, argv [i], sizeof (tmp -> name)); - if (interfaces) { - interface_reference (&tmp -> next, - interfaces, MDL); diff --git a/dhcp-4.1.0-add_timeout_when_NULL.patch b/dhcp-4.1.0-add_timeout_when_NULL.patch deleted file mode 100644 index e5da872..0000000 --- a/dhcp-4.1.0-add_timeout_when_NULL.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up dhcp-4.1.0/common/dispatch.c.dracut dhcp-4.1.0/common/dispatch.c ---- dhcp-4.1.0/common/dispatch.c.dracut 2008-01-23 16:43:04.000000000 -1000 -+++ dhcp-4.1.0/common/dispatch.c 2009-06-25 16:21:03.000000000 -1000 -@@ -104,6 +104,10 @@ void add_timeout (when, where, what, ref - { - struct timeout *t, *q; - -+ if (when == NULL) { -+ return; -+ } -+ - /* See if this timeout supersedes an existing timeout. */ - t = (struct timeout *)0; - for (q = timeouts; q; q = q -> next) { diff --git a/dhcp-4.1.0-default-requested-options.patch b/dhcp-4.1.0-default-requested-options.patch deleted file mode 100644 index 3692705..0000000 --- a/dhcp-4.1.0-default-requested-options.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -up dhcp-4.1.0/client/clparse.c.requested dhcp-4.1.0/client/clparse.c ---- dhcp-4.1.0/client/clparse.c.requested 2009-01-06 10:40:46.000000000 -1000 -+++ dhcp-4.1.0/client/clparse.c 2009-01-06 10:40:47.000000000 -1000 -@@ -37,7 +37,7 @@ - - struct client_config top_level_config; - --#define NUM_DEFAULT_REQUESTED_OPTS 9 -+#define NUM_DEFAULT_REQUESTED_OPTS 12 - struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1]; - - static void parse_client_default_duid(struct parse *cfile); -@@ -111,6 +111,21 @@ isc_result_t read_client_conf () - option_code_hash_lookup(&default_requested_options[8], - dhcpv6_universe.code_hash, &code, 0, MDL); - -+ /* 10 */ -+ code = DHO_NIS_DOMAIN; -+ option_code_hash_lookup(&default_requested_options[9], -+ dhcp_universe.code_hash, &code, 0, MDL); -+ -+ /* 11 */ -+ code = DHO_NIS_SERVERS; -+ option_code_hash_lookup(&default_requested_options[10], -+ dhcp_universe.code_hash, &code, 0, MDL); -+ -+ /* 12 */ -+ code = DHO_NTP_SERVERS; -+ option_code_hash_lookup(&default_requested_options[11], -+ dhcp_universe.code_hash, &code, 0, MDL); -+ - for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) { - if (default_requested_options[code] == NULL) - log_fatal("Unable to find option definition for " diff --git a/dhcp-4.1.0-dhclient-anycast.patch b/dhcp-4.1.0-dhclient-anycast.patch deleted file mode 100644 index 6533ba3..0000000 --- a/dhcp-4.1.0-dhclient-anycast.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff -up dhcp-4.1.0/client/clparse.c.anycast dhcp-4.1.0/client/clparse.c ---- dhcp-4.1.0/client/clparse.c.anycast 2009-01-06 10:43:52.000000000 -1000 -+++ dhcp-4.1.0/client/clparse.c 2009-01-06 10:43:53.000000000 -1000 -@@ -558,6 +558,17 @@ void parse_client_statement (cfile, ip, - } - return; - -+ case ANYCAST_MAC: -+ token = next_token (&val, (unsigned *)0, cfile); -+ if (ip) { -+ parse_hardware_param (cfile, &ip -> anycast_mac_addr); -+ } else { -+ parse_warn (cfile, "anycast mac address parameter %s", -+ "not allowed here."); -+ skip_to_semi (cfile); -+ } -+ return; -+ - case REQUEST: - token = next_token (&val, (unsigned *)0, cfile); - if (config -> requested_options == default_requested_options) -diff -up dhcp-4.1.0/common/conflex.c.anycast dhcp-4.1.0/common/conflex.c ---- dhcp-4.1.0/common/conflex.c.anycast 2009-01-06 10:43:52.000000000 -1000 -+++ dhcp-4.1.0/common/conflex.c 2009-01-06 10:43:53.000000000 -1000 -@@ -729,6 +729,8 @@ intern(char *atom, enum dhcp_token dfv) - } - if (!strcasecmp (atom + 1, "nd")) - return AND; -+ if (!strcasecmp (atom + 1, "nycast-mac")) -+ return ANYCAST_MAC; - if (!strcasecmp (atom + 1, "ppend")) - return APPEND; - if (!strcasecmp (atom + 1, "llow")) -diff -up dhcp-4.1.0/common/lpf.c.anycast dhcp-4.1.0/common/lpf.c ---- dhcp-4.1.0/common/lpf.c.anycast 2009-01-06 10:43:52.000000000 -1000 -+++ dhcp-4.1.0/common/lpf.c 2009-01-06 10:43:53.000000000 -1000 -@@ -333,6 +333,9 @@ ssize_t send_packet (interface, packet, - return send_fallback (interface, packet, raw, - len, from, to, hto); - -+ if (hto == NULL && interface->anycast_mac_addr.hlen) -+ hto = &interface->anycast_mac_addr; -+ - /* Assemble the headers... */ - assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto); - fudge = hbufp % 4; /* IP header must be word-aligned. */ -diff -up dhcp-4.1.0/includes/dhcpd.h.anycast dhcp-4.1.0/includes/dhcpd.h ---- dhcp-4.1.0/includes/dhcpd.h.anycast 2009-01-06 10:43:53.000000000 -1000 -+++ dhcp-4.1.0/includes/dhcpd.h 2009-01-06 10:43:53.000000000 -1000 -@@ -1215,6 +1215,7 @@ struct interface_info { - int dlpi_sap_length; - struct hardware dlpi_broadcast_addr; - # endif /* DLPI_SEND || DLPI_RECEIVE */ -+ struct hardware anycast_mac_addr; - }; - - struct hardware_link { -diff -up dhcp-4.1.0/includes/dhctoken.h.anycast dhcp-4.1.0/includes/dhctoken.h ---- dhcp-4.1.0/includes/dhctoken.h.anycast 2009-01-06 10:43:52.000000000 -1000 -+++ dhcp-4.1.0/includes/dhctoken.h 2009-01-06 10:49:12.000000000 -1000 -@@ -353,7 +353,8 @@ enum dhcp_token { - TEMPORARY = 656, - PREFIX6 = 657, - FIXED_PREFIX6 = 658, -- BOOTP_BROADCAST_ALWAYS = 659 -+ BOOTP_BROADCAST_ALWAYS = 659, -+ ANYCAST_MAC = 660 - }; - - #define is_identifier(x) ((x) >= FIRST_TOKEN && \ diff --git a/dhcp-4.1.0-dhclient-decline-backoff.patch b/dhcp-4.1.0-dhclient-decline-backoff.patch deleted file mode 100644 index eb9d52c..0000000 --- a/dhcp-4.1.0-dhclient-decline-backoff.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -up dhcp-4.1.0/client/dhclient.c.backoff dhcp-4.1.0/client/dhclient.c ---- dhcp-4.1.0/client/dhclient.c.backoff 2009-01-06 10:08:07.000000000 -1000 -+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 10:10:27.000000000 -1000 -@@ -1185,6 +1185,7 @@ void state_init (cpp) - void *cpp; - { - struct client_state *client = cpp; -+ enum dhcp_state init_state = client->state; - - ASSERT_STATE(state, S_INIT); - -@@ -1197,9 +1198,16 @@ void state_init (cpp) - client -> first_sending = cur_time; - client -> interval = client -> config -> initial_interval; - -- /* Add an immediate timeout to cause the first DHCPDISCOVER packet -- to go out. */ -- send_discover (client); -+ if (init_state != S_DECLINED) { -+ /* Add an immediate timeout to cause the first DHCPDISCOVER packet -+ to go out. */ -+ send_discover(client); -+ } else { -+ /* We've received an OFFER and it has been DECLINEd by dhclient-script. -+ * wait for a random time between 1 and backoff_cutoff seconds before -+ * trying again. */ -+ add_timeout(cur_time + ((1 + (random() >> 2)) % client->config->backoff_cutoff), send_discover, client, 0, 0); -+ } - } - - /* -@@ -1478,6 +1486,7 @@ void bind_lease (client) - send_decline (client); - destroy_client_lease (client -> new); - client -> new = (struct client_lease *)0; -+ client -> state = S_DECLINED; - state_init (client); - return; - } -@@ -3680,6 +3689,7 @@ void client_location_changed () - case S_INIT: - case S_REBINDING: - case S_STOPPED: -+ case S_DECLINED: - break; - } - client -> state = S_INIT; -diff -up dhcp-4.1.0/includes/dhcpd.h.backoff dhcp-4.1.0/includes/dhcpd.h ---- dhcp-4.1.0/includes/dhcpd.h.backoff 2009-01-06 10:08:07.000000000 -1000 -+++ dhcp-4.1.0/includes/dhcpd.h 2009-01-06 10:08:07.000000000 -1000 -@@ -1016,7 +1016,8 @@ enum dhcp_state { - S_BOUND = 5, - S_RENEWING = 6, - S_REBINDING = 7, -- S_STOPPED = 8 -+ S_STOPPED = 8, -+ S_DECLINED = 9 - }; - - /* Authentication and BOOTP policy possibilities (not all values work diff --git a/dhcp-4.1.0-dhclient-usage.patch b/dhcp-4.1.0-dhclient-usage.patch deleted file mode 100644 index 7e7c721..0000000 --- a/dhcp-4.1.0-dhclient-usage.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up dhcp-4.1.0/client/dhclient.c.usage dhcp-4.1.0/client/dhclient.c ---- dhcp-4.1.0/client/dhclient.c.usage 2009-01-06 10:36:55.000000000 -1000 -+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 10:39:58.000000000 -1000 -@@ -990,6 +990,10 @@ static void usage() - "[-s server]"); - log_error(" [-cf config-file] [-lf lease-file]%s", - "[-pf pid-file] [-e VAR=val]"); -+ log_error(" [-I ] [-B]"); -+ log_error(" [-H | -F ] [-timeout ]"); -+ log_error(" [-V ]"); -+ log_error(" [-R ]"); - log_fatal(" [-sf script-file] [interface]"); - } - diff --git a/dhcp-4.1.0-errwarn-message.patch b/dhcp-4.1.0-errwarn-message.patch deleted file mode 100644 index 266c319..0000000 --- a/dhcp-4.1.0-errwarn-message.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up dhcp-4.1.0/omapip/errwarn.c.errwarn dhcp-4.1.0/omapip/errwarn.c ---- dhcp-4.1.0/omapip/errwarn.c.errwarn 2007-07-12 20:43:42.000000000 -1000 -+++ dhcp-4.1.0/omapip/errwarn.c 2009-01-06 07:02:20.000000000 -1000 -@@ -76,20 +76,13 @@ void log_fatal (const char * fmt, ... ) - - #if !defined (NOMINUM) - log_error ("%s", ""); -- log_error ("If you did not get this software from ftp.isc.org, please"); -- log_error ("get the latest from ftp.isc.org and install that before"); -- log_error ("requesting help."); -+ log_error ("This version of ISC DHCP is based on the release available"); -+ log_error ("on ftp.isc.org. Features have been added and other changes"); -+ log_error ("have been made to the base software release in order to make"); -+ log_error ("it work better with this distribution."); - log_error ("%s", ""); -- log_error ("If you did get this software from ftp.isc.org and have not"); -- log_error ("yet read the README, please read it before requesting help."); -- log_error ("If you intend to request help from the dhcp-server@isc.org"); -- log_error ("mailing list, please read the section on the README about"); -- log_error ("submitting bug reports and requests for help."); -- log_error ("%s", ""); -- log_error ("Please do not under any circumstances send requests for"); -- log_error ("help directly to the authors of this software - please"); -- log_error ("send them to the appropriate mailing list as described in"); -- log_error ("the README file."); -+ log_error ("Please report for this software via the Red Hat Bugzilla site:"); -+ log_error (" http://bugzilla.redhat.com"); - log_error ("%s", ""); - log_error ("exiting."); - #endif diff --git a/dhcp-4.1.0-failover-ports.patch b/dhcp-4.1.0-failover-ports.patch deleted file mode 100644 index 02dc11c..0000000 --- a/dhcp-4.1.0-failover-ports.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up dhcp-4.1.0/server/confpars.c.failover dhcp-4.1.0/server/confpars.c ---- dhcp-4.1.0/server/confpars.c.failover 2009-01-06 10:24:38.000000000 -1000 -+++ dhcp-4.1.0/server/confpars.c 2009-01-06 10:24:38.000000000 -1000 -@@ -1142,10 +1142,17 @@ void parse_failover_peer (cfile, group, - parse_warn (cfile, "peer address may not be omitted"); - - /* XXX - when/if we get a port number assigned, just set as default */ -+ /* See Red Hat Bugzilla 167292: -+ * we do now: dhcp-failover 647/tcp -+ * dhcp-failover 647/udp -+ * dhcp-failover 847/tcp -+ * dhcp-failover 847/udp -+ * IANA registration by Bernard Volz -+ */ - if (!peer -> me.port) -- parse_warn (cfile, "local port may not be omitted"); -+ peer -> me.port = 647; - if (!peer -> partner.port) -- parse_warn (cfile, "peer port may not be omitted"); -+ peer -> partner.port = 847; - - if (peer -> i_am == primary) { - if (!peer -> hba) { diff --git a/dhcp-4.1.0-garbage-chars.patch b/dhcp-4.1.0-garbage-chars.patch deleted file mode 100644 index 1505609..0000000 --- a/dhcp-4.1.0-garbage-chars.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up dhcp-4.1.0/common/tables.c.garbage dhcp-4.1.0/common/tables.c ---- dhcp-4.1.0/common/tables.c.garbage 2008-01-23 16:43:04.000000000 -1000 -+++ dhcp-4.1.0/common/tables.c 2009-01-06 12:09:41.000000000 -1000 -@@ -207,7 +207,7 @@ static struct option dhcp_options[] = { - { "netinfo-server-tag", "t", &dhcp_universe, 113, 1 }, - { "default-url", "t", &dhcp_universe, 114, 1 }, - { "subnet-selection", "I", &dhcp_universe, 118, 1 }, -- { "domain-search", "Dc", &dhcp_universe, 119, 1 }, -+ { "domain-search", "D", &dhcp_universe, 119, 1 }, - { "vivco", "Evendor-class.", &dhcp_universe, 124, 1 }, - { "vivso", "Evendor.", &dhcp_universe, 125, 1 }, - #if 0 diff --git a/dhcp-4.1.0-inherit-leases.patch b/dhcp-4.1.0-inherit-leases.patch deleted file mode 100644 index 0f44ed9..0000000 --- a/dhcp-4.1.0-inherit-leases.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -up dhcp-4.1.0/client/dhclient.c.inherit dhcp-4.1.0/client/dhclient.c ---- dhcp-4.1.0/client/dhclient.c.inherit 2009-01-06 12:08:56.000000000 -1000 -+++ dhcp-4.1.0/client/dhclient.c 2009-01-06 12:08:57.000000000 -1000 -@@ -2299,6 +2299,7 @@ void send_request (cpp) - { - struct client_state *client = cpp; - -+ int i; - int result; - int interval; - struct sockaddr_in destination; -@@ -2358,6 +2359,22 @@ void send_request (cpp) - /* Now do a preinit on the interface so that we can - discover a new address. */ - script_init (client, "PREINIT", (struct string_list *)0); -+ -+ /* Has an active lease */ -+ if (client -> interface -> addresses != NULL) { -+ for (i = 0; i < client -> interface -> address_count; i++) { -+ if (client -> active && -+ client -> active -> is_bootp && -+ client -> active -> expiry > cur_time && -+ client -> interface -> addresses[i].s_addr != 0 && -+ client -> active -> address.len == 4 && -+ memcpy (client -> active -> address.iabuf, &(client -> interface -> addresses[i]), 4) == 0) { -+ client_envadd (client, "", "keep_old_ip", "%s", "yes"); -+ break; -+ } -+ } -+ } -+ - if (client -> alias) - script_write_params (client, "alias_", - client -> alias); diff --git a/dhcp-4.1.0-invalid-dhclient-conf.patch b/dhcp-4.1.0-invalid-dhclient-conf.patch deleted file mode 100644 index 1741c15..0000000 --- a/dhcp-4.1.0-invalid-dhclient-conf.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up dhcp-4.1.0/client/dhclient.conf.supersede dhcp-4.1.0/client/dhclient.conf ---- dhcp-4.1.0/client/dhclient.conf.supersede 1997-06-02 12:50:44.000000000 -1000 -+++ dhcp-4.1.0/client/dhclient.conf 2009-01-06 12:27:08.000000000 -1000 -@@ -1,10 +1,10 @@ - send host-name "andare.fugue.com"; - send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; - send dhcp-lease-time 3600; --supersede domain-name "fugue.com home.vix.com"; -+supersede domain-search "fugue.com home.vix.com"; - prepend domain-name-servers 127.0.0.1; - request subnet-mask, broadcast-address, time-offset, routers, -- domain-name, domain-name-servers, host-name; -+ domain-search, domain-name, domain-name-servers, host-name; - require subnet-mask, domain-name-servers; - timeout 60; - retry 60; diff --git a/dhcp-4.1.0-manpages.patch b/dhcp-4.1.0-manpages.patch deleted file mode 100644 index cf0e4a2..0000000 --- a/dhcp-4.1.0-manpages.patch +++ /dev/null @@ -1,740 +0,0 @@ -diff -up dhcp-4.1.0/client/dhclient.8.man dhcp-4.1.0/client/dhclient.8 ---- dhcp-4.1.0/client/dhclient.8.man 2008-11-20 04:55:14.000000000 -1000 -+++ dhcp-4.1.0/client/dhclient.8 2009-01-06 11:51:30.000000000 -1000 -@@ -111,6 +111,33 @@ relay - .B -w - ] - [ -+.B -B -+] -+[ -+.B -I -+.I dhcp-client-identifier -+] -+[ -+.B -H -+.I host-name -+] -+[ -+.B -F -+.I fqdn.fqdn -+] -+[ -+.B -V -+.I vendor-class-identifier -+] -+[ -+.B -R -+.I request-option-list -+] -+[ -+.B -timeout -+.I timeout -+] -+[ - .B -v - ] - [ -@@ -138,32 +165,6 @@ important details about the network to w - the location of a default router, the location of a name server, and - so on. - .PP --If given the -4 command line argument (default), dhclient will use the --DHCPv4 protocol to obtain an IPv4 address and configuration parameters. --.PP --If given the -6 command line argument, dhclient will use the DHCPv6 --protocol to obtain whatever IPv6 addresses are available along with --configuration parameters. But with --.B -S --it uses Information-request to get only (i.e., without address) --stateless configuration parameters. --.PP --The default DHCPv6 behavior is modified too with --.B -T --which asks for IPv6 temporary addresses, one set per --.B -T --flag. --.B -P --enables the IPv6 prefix delegation. --As temporary addresses or prefix delegation disables the normal --address query, --.B -N --restores it. Note it is not recommended to mix queries of different types --together, or even to share the lease file between them. --.PP --If given the --version command line argument, dhclient will print its --version number and exit. --.PP - On startup, dhclient reads the - .IR dhclient.conf - for configuration instructions. It then gets a list of all the -@@ -217,141 +218,259 @@ file. If interfaces are specified in t - only configure interfaces that are either specified in the - configuration file or on the command line, and will ignore all other - interfaces. --.PP --If the DHCP client should listen and transmit on a port other than the --standard (port 68), the --.B -p --flag may used. It should be followed by the udp port number that --dhclient should use. This is mostly useful for debugging purposes. --If a different port is specified for the client to listen on and --transmit on, the client will also use a different destination port - --one less than the specified port. --.PP --The DHCP client normally transmits any protocol messages it sends --before acquiring an IP address to, 255.255.255.255, the IP limited --broadcast address. For debugging purposes, it may be useful to have --the server transmit these messages to some other address. This can --be specified with the --.B -s --flag, followed by the IP address or domain name of the destination. --This feature is not supported by DHCPv6. --.PP --For testing purposes, the giaddr field of all packets that the client --sends can be set using the --.B -g --flag, followed by the IP address to send. This is only useful for testing, --and should not be expected to work in any consistent or useful way. --.PP --The DHCP client will normally run in the foreground until it has --configured an interface, and then will revert to running in the --background. To run force dhclient to always run as a foreground --process, the --.B -d --flag should be specified. This is useful when running the client --under a debugger, or when running it out of inittab on System V --systems. --.PP --The dhclient daemon creates its own environment when executing the --dhclient-script to do the grunt work of interface configuration. --To define extra environment variables and their values, use the --.B -e --flag, followed by the environment variable name and value assignment, --just as one would assign a variable in a shell. Eg: --.B -e --.I IF_METRIC=1 --.PP --The client normally prints no output during its startup sequence. It --can be made to emit verbose messages displaying the startup sequence events --until it has acquired an address by supplying the --.B -v --command line argument. In either case, the client logs messages using --the --.B syslog (3) --facility. A --.B -q --command line argument is provided for backwards compatibility, but since --dhclient is quiet by default, it has no effect. --.PP --The client normally doesn't release the current lease as it is not --required by the DHCP protocol. Some cable ISPs require their clients --to notify the server if they wish to release an assigned IP address. --The --.B -r --flag explicitly releases the current lease, and once the lease has been --released, the client exits. --.PP -+.SH OPTIONS -+.TP -+.BI \-4 -+Use the DHCPv4 protocol to obtain an IPv4 address and configuration -+parameters (default). -+ -+.TP -+.BI \-6 -+Use the DHCPv6 protocol to obtain whatever IPv6 addresses are available -+along with configuration parameters. The functionality of DHCPv6 mode -+may be modified with the -+.BI \-S -+, -+.BI \-T -+, and -+.BI \-N -+options. -+ -+.TP -+.BI \-S -+Perform an information-only request over DHCPv6 to get stateless -+configuration parameters. It is not recommended to combine this option -+with the -+.BI \-N -+, -+.BI \-P -+, or -+.BI \-T -+options or to share lease files between different modes of operation. Only -+valid with the -+.BI \-6 -+option. -+ -+.TP -+.BI \-N -+Perform a normal (IA_NA) address query over DHCPv6. It is not recommended -+to combine this option with the -+.BI \-P -+, -+.BI \-S -+, or -+.BI \-T -+options or to share lease files between different modes of operation. Only -+valid with the -+.BI \-6 -+option. -+ -+.TP -+.BI \-T -+Perform a temporary (IA_TA) address query over DHCPv6 (disables normal address -+query). It is not recommended to combine this option with the -+.BI \-N -+, -+.BI \-P -+, or -+.BI \-S -+options or to share lease files between different modes of operation. Only -+valid with the -+.BI \-6 -+option. -+ -+.TP -+.BI \-P -+Enable IPv6 prefix delegation (disables normal address query). It is not -+not recommended to combine this option with the -+.BI \-N -+, -+.BI \-S -+, or -+.BI \-T -+options or to share lease files between different modes of operation. Only -+valid with the -+.BI \-6 -+option. -+ -+.TP -+.BI \-p\ -+The UDP port number the DHCP client should listen and transmit on. If -+unspecified, -+.B dhclient -+uses the default port 68. This option is mostly useful for debugging -+purposes. If a different port is specified for the client to listen and -+transmit on, the client will also use a different destination port - one -+less than the specified port. -+ -+.TP -+.BI \-d -+Force -+.B dhclient -+to run as a foreground process. This is useful when running the client -+under a debugger, or when running it out of inittab on System V systems. -+ -+.TP -+.BI \-e\ VAR=value -+Define additional environment variables for the environment where -+dhclient-script executes. You may specify multiplate -+.B \-e -+options on the command line. For example: -+.B \-e IF_METRIC=1 -+ -+.TP -+.BI \-q -+Suppress all terminal and log output except error messages. -+ -+.TP -+.BI \-1 -+Try once to get a lease. One failure, exit with code 2. -+ -+.TP -+.BI \-r -+Tell -+.B dhclient -+to release the current lease it has from the server. This is not required -+by the DHCP protocol, but some ISPs require their clients to notify the -+server if they wish to release an assigned IP address. -+ -+.TP -+.BI \-lf\ -+Path to the lease database file. If unspecified, the default -+.B DBDIR/dhclient.leases -+is used. -+ -+.TP -+.BI \-pf\ -+Path to the process ID file. If unspecified, the default -+.B RUNDIR/dhclient.pid -+is used. -+ -+.TP -+.BI \-cf\ -+Path to the client configuration file. If unspecified, the default -+.B ETCDIR/dhclient.conf -+is used. -+ -+.TP -+.BI \-sf\ -+Path to the network configuration script invoked by -+.B dhclient -+when it gets a lease. If unspecified, the default -+.B /sbin/dhclient-script -+is used. -+ -+.TP -+.BI \-s\ -+Specifiy the server IP address or fully qualified domain name to transmit -+DHCP protocol messages to. Normally, -+.B dhclient -+transmits these messages to 255.255.255.255 (the IP limited broadcast -+address). Overriding this is mostly useful for debugging purposes. -+ -+.TP -+.BI \-g\ -+Only for debugging. Set the giaddr field of all packets the client -+sends to the IP address specified. This should not be expected to work -+in any consistent or useful way. -+ -+.TP -+.BI \-n -+Do not configure any interfaces. Most useful combined with the -+.B -w -+option. -+ -+.TP -+.BI \-nw -+Become a daemon process immediately (nowait) rather than waiting until an IP -+address has been acquired. -+ -+.TP -+.BI \-w -+Keep running even if no network interfaces are found. The -+.B omshell -+program can be used to notify the client when a network interface has been -+added or removed so it can attempt to configure an IP address on that -+interface. -+ -+.TP -+.BI \-B -+Set the BOOTP broadcast flag in request packets so servers will always -+broadcast replies. -+ -+.TP -+.BI \-I\ -+Specify the dhcp-client-identifier option to send to the DHCP server. -+ -+.TP -+.BI \-H\ -+Specify the host-name option to send to the DHCP server. The host-name -+string only contains the client's hostname prefix, to which the server will -+append the ddns-domainname or domain-name options, if any, to derive the -+fully qualified domain name of the client. The -+.B -H -+option cannot be used with the -+.B -F -+option. -+ -+.TP -+.BI \-F\ -+Specify the fqdn.fqdn option to send to the DHCP server. This option cannot -+be used with the -+.B -H -+option. The fqdn.fqdn option must specify the complete domain name of the -+client host, which the server may use for dynamic DNS updates. -+ -+.TP -+.BI \-V\ -+Specify the vendor-class-identifier option to send to the DHCP server. -+ -+.TP -+.BI \-R\