From c637bc589d750b9135d0a760310eaeeb082e36cd Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Thu, 16 Aug 2007 18:33:06 +0000 Subject: [PATCH] - Remove the -x switch enabling extended new option info. If given to dhclient now, it's ignored. --- dhcp-3.0.5-extended-new-option-info.patch | 210 ------- ...e.patch => dhcp-3.0.6-dhclient-usage.patch | 25 +- dhcp-3.0.6-ignore-hyphen-x.patch | 13 + ...t.patch => dhcp-3.0.6-libdhcp4client.patch | 561 +++++++++--------- ...anpages.patch => dhcp-3.0.6-manpages.patch | 392 ++++++------ ...-options.patch => dhcp-3.0.6-options.patch | 82 +-- dhcp.spec | 94 +-- 7 files changed, 600 insertions(+), 777 deletions(-) delete mode 100644 dhcp-3.0.5-extended-new-option-info.patch rename dhcp-3.0.5-dhclient-usage.patch => dhcp-3.0.6-dhclient-usage.patch (78%) create mode 100644 dhcp-3.0.6-ignore-hyphen-x.patch rename dhcp-3.0.5-libdhcp4client.patch => dhcp-3.0.6-libdhcp4client.patch (80%) rename dhcp-3.0.5-manpages.patch => dhcp-3.0.6-manpages.patch (74%) rename dhcp-3.0.5-options.patch => dhcp-3.0.6-options.patch (88%) diff --git a/dhcp-3.0.5-extended-new-option-info.patch b/dhcp-3.0.5-extended-new-option-info.patch deleted file mode 100644 index 04af71d..0000000 --- a/dhcp-3.0.5-extended-new-option-info.patch +++ /dev/null @@ -1,210 +0,0 @@ ---- dhcp-3.0.5/client/dhclient.c.enoi 2007-03-30 16:27:32.000000000 -0400 -+++ dhcp-3.0.5/client/dhclient.c 2007-03-30 16:27:51.000000000 -0400 -@@ -74,6 +74,9 @@ - int onetry=0; - int quiet=0; - int nowait=0; -+#ifdef EXTENDED_NEW_OPTION_INFO -+int extended_option_environment = 0; -+#endif - - static void usage PROTO ((void)); - -@@ -203,6 +206,11 @@ - } else if (!strcmp (argv [i], "--version")) { - log_info ("isc-dhclient-%s", DHCP_VERSION); - exit (0); -+#ifdef EXTENDED_NEW_OPTION_INFO -+ } else if (!strcmp (argv [i], "-x")) { -+ extended_option_environment = 1; -+ new_option_info_tree = GENERATE_NEW_OPTION_INFO; -+#endif - } else if (argv [i][0] == '-') { - usage (); - } else { -@@ -475,7 +483,11 @@ - log_info (arr); - log_info (url); - -+#ifdef EXTENDED_NEW_OPTION_INFO -+ log_error ("Usage: dhclient [-1dqr] [-nwx] [-p ] %s", -+#else - log_error ("Usage: dhclient [-1dqr] [-nw] [-p ] %s", -+#endif - "[-s server]"); - log_error (" [-cf config-file] [-lf lease-file]%s", - "[-pf pid-file] [-e VAR=val]"); -@@ -2426,8 +2438,30 @@ - struct envadd_state { - struct client_state *client; - const char *prefix; -+#ifdef EXTENDED_NEW_OPTION_INFO -+ struct universe *universe; -+#endif - }; - -+#ifdef EXTENDED_NEW_OPTION_INFO -+static -+void build_universe_info_envvar -+( struct option_cache *oc, -+ struct packet *p, struct lease *l, -+ struct client_state *client, -+ struct option_state *in_o, -+ struct option_state *cf_o, -+ struct binding_scope **scope, -+ struct universe *u, void *es -+) -+{ -+ char info_name[512], info_data[512]; -+ snprintf(info_name, 512, "%s._universe_.", oc->option->universe->name); -+ snprintf(info_data, 512, "%u:%s", oc->option->code,oc->option->format); -+ client_envadd( client, info_name, oc->option->name, info_data ); -+} -+#endif -+ - void client_option_envadd (struct option_cache *oc, - struct packet *packet, struct lease *lease, - struct client_state *client_state, -@@ -2444,6 +2478,28 @@ - in_options, cfg_options, scope, oc, MDL)) { - if (data.len) { - char name [256]; -+#ifdef EXTENDED_NEW_OPTION_INFO -+ if (extended_option_environment) { -+ if ((oc->option->universe != &dhcp_universe) -+ && (oc->option->universe->index > fqdn_universe.index) -+ && (es->universe != oc->option->universe)) { -+ es->universe = oc->option->universe; -+ (*(es->universe->foreach)) ((struct packet *)0, -+ (struct lease *)0, -+ client_state, -+ in_options, cfg_options, -+ scope, es->universe, es, -+ build_universe_info_envvar); -+ } else { -+ if (lookup_new_option_info(oc->option) != NULL) { -+ build_universe_info_envvar(oc, packet, lease, -+ client_state, in_options, -+ cfg_options, scope, -+ oc->option->universe, es); -+ } -+ } -+ } -+#endif - if (dhcp_option_ev_name (name, sizeof name, - oc -> option)) { - client_envadd (es -> client, es -> prefix, -@@ -2470,6 +2526,7 @@ - - es.client = client; - es.prefix = prefix; -+ es.universe = NULL; - - client_envadd (client, - prefix, "ip_address", "%s", piaddr (lease -> address)); -@@ -2679,7 +2736,14 @@ - s = option -> name; - if (j + 1 == buflen) - return 0; -+#ifdef EXTENDED_NEW_OPTION_INFO -+ if (!extended_option_environment) -+ buf[j++] = '_'; -+ else -+ buf[j++] = '.'; -+#else - buf [j++] = '_'; -+#endif - } - ++i; - } while (i != 2); ---- dhcp-3.0.5/client/dhclient.8.enoi 2005-09-14 12:03:33.000000000 -0400 -+++ dhcp-3.0.5/client/dhclient.8 2007-03-30 16:27:32.000000000 -0400 -@@ -82,6 +82,9 @@ - .B -w - ] - [ -+.B -x -+] -+[ - .I if0 - [ - .I ...ifN -@@ -265,6 +268,11 @@ - supplying the - .B -nw - flag. -+.PP -+The -x argument enables extended option information to be created in the -+-s dhclient-script environment, which would allow applications running -+in that environment to handle options they do not know about in advance - -+this is a Red Hat extension to support dhcdbd and NetworkManager. - .SH CONFIGURATION - The syntax of the dhclient.conf(5) file is discussed separately. - .SH OMAPI ---- dhcp-3.0.5/common/parse.c.enoi 2007-03-30 16:27:32.000000000 -0400 -+++ dhcp-3.0.5/common/parse.c 2007-03-30 16:27:32.000000000 -0400 -@@ -1266,6 +1266,10 @@ - option_hash_add (option -> universe -> hash, - (const char *)option -> name, - 0, option, MDL); -+#ifdef EXTENDED_NEW_OPTION_INFO -+ if (new_option_info_tree != NULL) -+ add_new_option_info(option); -+#endif - return 1; - } - ---- dhcp-3.0.5/common/tables.c.enoi 2006-02-22 17:43:27.000000000 -0500 -+++ dhcp-3.0.5/common/tables.c 2007-03-30 16:27:32.000000000 -0400 -@@ -1250,3 +1250,35 @@ - fqdn_universe.name, 0, - &fqdn_universe, MDL); - } -+ -+#ifdef EXTENDED_NEW_OPTION_INFO -+#include -+ -+void *new_option_info_tree = NULL; -+ -+static int new_option_info_comparator(const void * p1, const void * p2) { -+ uint32_t ocode1 = (((const struct option*)p1)->universe->index << 8) -+ | (((const struct option*)p1)->code), -+ ocode2 = (((const struct option*)p2)->universe->index << 8) -+ | (((const struct option*)p2)->code); -+ -+ return((ocode1 == ocode2) ? 0 : ((ocode1 > ocode2) ? 1 : -1)); -+} -+ -+void *add_new_option_info(struct option * option) { -+ if (option->universe->index >= fqdn_universe.index) -+ return NULL; -+ -+ if (new_option_info_tree == GENERATE_NEW_OPTION_INFO) -+ new_option_info_tree = NULL; -+ -+ return tsearch(option, &(new_option_info_tree), new_option_info_comparator); -+} -+ -+void *lookup_new_option_info(struct option * option) { -+ if (new_option_info_tree == GENERATE_NEW_OPTION_INFO) -+ return NULL; -+ -+ return tfind(option, &(new_option_info_tree), new_option_info_comparator); -+} -+#endif ---- dhcp-3.0.5/includes/dhcpd.h.enoi 2006-05-17 16:16:59.000000000 -0400 -+++ dhcp-3.0.5/includes/dhcpd.h 2007-03-30 16:27:32.000000000 -0400 -@@ -1811,6 +1811,13 @@ - void initialize_common_option_spaces PROTO ((void)); - struct universe *config_universe; - -+#ifdef EXTENDED_NEW_OPTION_INFO -+#define GENERATE_NEW_OPTION_INFO ((void*)1) -+extern void *new_option_info_tree; -+extern void *add_new_option_info(struct option *); -+extern void *lookup_new_option_info(struct option *); -+#endif -+ - /* stables.c */ - #if defined (FAILOVER_PROTOCOL) - extern failover_option_t null_failover_option; diff --git a/dhcp-3.0.5-dhclient-usage.patch b/dhcp-3.0.6-dhclient-usage.patch similarity index 78% rename from dhcp-3.0.5-dhclient-usage.patch rename to dhcp-3.0.6-dhclient-usage.patch index 7240394..48c44db 100644 --- a/dhcp-3.0.5-dhclient-usage.patch +++ b/dhcp-3.0.6-dhclient-usage.patch @@ -1,6 +1,7 @@ ---- dhcp-3.0.5/client/dhclient.c.usage 2007-04-17 10:43:00.000000000 -0400 -+++ dhcp-3.0.5/client/dhclient.c 2007-04-17 10:43:30.000000000 -0400 -@@ -819,20 +819,29 @@ +diff -up dhcp-3.0.6/client/dhclient.c.usage dhcp-3.0.6/client/dhclient.c +--- dhcp-3.0.6/client/dhclient.c.usage 2007-08-15 11:48:12.000000000 -0400 ++++ dhcp-3.0.6/client/dhclient.c 2007-08-15 11:50:22.000000000 -0400 +@@ -808,16 +808,25 @@ int main (argc, argv, envp) static void usage () { @@ -8,6 +9,12 @@ - log_info (copyright); - log_info (arr); - log_info (url); +- +- log_error ("Usage: dhclient [-1dqr] [-nw] [-p ] %s", +- "[-s server]"); +- log_error (" [-cf config-file] [-lf lease-file]%s", +- "[-pf pid-file] [-e VAR=val]"); +- log_fatal (" [-sf script-file] [interface]"); + printf ("%s %s\n", message, DHCP_VERSION); + printf (copyright); + printf ("\n"); @@ -15,18 +22,8 @@ + printf ("\n"); + printf (url); + printf ("\n"); - - #ifdef EXTENDED_NEW_OPTION_INFO -- log_error ("Usage: dhclient [-1dqr] [-nwx] [-p ] %s", -+ printf ("Usage: dhclient [-1dqr] [-nwx] [-p ] %s", - #else -- log_error ("Usage: dhclient [-1dqr] [-nw] [-p ] %s", ++ + printf ("Usage: dhclient [-1dqr] [-nw] [-p ] %s", - #endif -- "[-s server]"); -- log_error (" [-cf config-file] [-lf lease-file]%s", -- "[-pf pid-file] [-e VAR=val]"); -- log_fatal (" [-sf script-file] [interface]"); + "[-s server]"); + printf (" [-cf config-file] [-lf lease-file]%s", + "[-pf pid-file] [-e VAR=val]"); diff --git a/dhcp-3.0.6-ignore-hyphen-x.patch b/dhcp-3.0.6-ignore-hyphen-x.patch new file mode 100644 index 0000000..a8f5168 --- /dev/null +++ b/dhcp-3.0.6-ignore-hyphen-x.patch @@ -0,0 +1,13 @@ +diff -up dhcp-3.0.6/client/dhclient.c.enoi dhcp-3.0.6/client/dhclient.c +--- dhcp-3.0.6/client/dhclient.c.enoi 2007-08-15 16:14:32.000000000 -0400 ++++ dhcp-3.0.6/client/dhclient.c 2007-08-15 16:17:17.000000000 -0400 +@@ -259,6 +259,9 @@ int main (argc, argv, envp) + } else if (!strcmp (argv [i], "--version")) { + log_info ("isc-dhclient-%s", DHCP_VERSION); + exit (0); ++ } else if (!strcmp (argv [i], "-x")) { ++ /* ignored for compatibility */ ++ continue; + } else if (!strcmp (argv [i], "-I")) { + if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) { + usage (); diff --git a/dhcp-3.0.5-libdhcp4client.patch b/dhcp-3.0.6-libdhcp4client.patch similarity index 80% rename from dhcp-3.0.5-libdhcp4client.patch rename to dhcp-3.0.6-libdhcp4client.patch index ee9beb0..37310cd 100644 --- a/dhcp-3.0.5-libdhcp4client.patch +++ b/dhcp-3.0.6-libdhcp4client.patch @@ -1,7 +1,8 @@ ---- dhcp-3.0.5/client/dhclient.c.libdhcp4client 2007-03-30 20:54:06.000000000 -0400 -+++ dhcp-3.0.5/client/dhclient.c 2007-03-30 20:54:34.000000000 -0400 -@@ -85,16 +85,52 @@ - #endif +diff -up dhcp-3.0.6/client/dhclient.c.libdhcp4client dhcp-3.0.6/client/dhclient.c +--- dhcp-3.0.6/client/dhclient.c.libdhcp4client 2007-08-15 16:24:55.000000000 -0400 ++++ dhcp-3.0.6/client/dhclient.c 2007-08-15 16:26:24.000000000 -0400 +@@ -82,16 +82,52 @@ int quiet=0; + int nowait=0; int bootp_broadcast_always = 0; +#ifdef LIBDHCP @@ -53,7 +54,7 @@ int i; struct servent *ent; struct interface_info *ip; -@@ -122,6 +158,7 @@ +@@ -119,6 +155,7 @@ int main (argc, argv, envp) char *arg_conf = NULL; int arg_conf_len = 0; @@ -61,7 +62,7 @@ /* Make sure we have stdin, stdout and stderr. */ i = open ("/dev/null", O_RDWR); if (i == 0) -@@ -142,6 +179,7 @@ +@@ -139,6 +176,7 @@ int main (argc, argv, envp) #if !(defined (DEBUG) || defined (SYSLOG_4_2) || defined (__CYGWIN32__)) setlogmask (LOG_UPTO (LOG_INFO)); #endif @@ -69,7 +70,7 @@ /* Set up the OMAPI. */ status = omapi_init (); -@@ -439,8 +477,12 @@ +@@ -431,8 +469,12 @@ int main (argc, argv, envp) } } @@ -82,7 +83,7 @@ if (!quiet) { log_info ("%s %s", message, DHCP_VERSION); log_info (copyright); -@@ -449,6 +491,7 @@ +@@ -441,6 +483,7 @@ int main (argc, argv, envp) log_info ("%s", ""); } else log_perror = 0; @@ -90,7 +91,7 @@ /* If we're given a relay agent address to insert, for testing purposes, figure out what it is. */ -@@ -683,11 +726,17 @@ +@@ -672,11 +715,17 @@ int main (argc, argv, envp) arg_conf_len = 0; } @@ -108,7 +109,7 @@ /* XXX */ /* config_counter(&snd_counter, &rcv_counter); */ -@@ -706,7 +755,7 @@ +@@ -695,7 +744,7 @@ int main (argc, argv, envp) if (!persist) { /* Nothing more to do. */ log_info ("No broadcast interfaces found - exiting."); @@ -117,7 +118,7 @@ } } else if (!release_mode) { /* Call the script with the list of interfaces. */ -@@ -800,6 +849,7 @@ +@@ -789,6 +838,7 @@ int main (argc, argv, envp) dmalloc_outstanding = 0; #endif @@ -125,7 +126,7 @@ /* If we're not supposed to wait before getting the address, don't. */ if (nowait) -@@ -812,6 +862,128 @@ +@@ -801,6 +851,126 @@ int main (argc, argv, envp) /* Start dispatching packets and timeouts... */ dispatch (); @@ -175,7 +176,6 @@ + default_lease_time = 43200; + + dhcp_max_agent_option_packet_length = 0; -+ extended_option_environment = 0; + iaddr_any.len = 4; + memset(&(iaddr_any.iabuf[0]), '\0', 4); + iaddr_broadcast.len = 4; @@ -198,7 +198,6 @@ + path_dhclient_script = path_dhclient_script_array; + remote_port = 0; + resolver_inited = 0; -+ new_option_info_tree = 0; + log_perror = 1; + global_scope = NULL; + root_group = NULL; @@ -254,7 +253,7 @@ /*NOTREACHED*/ return 0; -@@ -1204,7 +1376,20 @@ +@@ -1191,7 +1361,20 @@ void dhcpack (packet) if (client -> new -> rebind < cur_time) client -> new -> rebind = TIME_MAX; @@ -275,7 +274,7 @@ } void bind_lease (client) -@@ -1240,6 +1425,9 @@ +@@ -1227,6 +1410,9 @@ void bind_lease (client) return; } @@ -285,7 +284,7 @@ /* Write out the new lease. */ write_client_lease (client, client -> new, 0, 0); -@@ -1340,11 +1528,13 @@ +@@ -1327,11 +1513,13 @@ int commit_leases () return 0; } @@ -299,7 +298,7 @@ int write_host (host) struct host_decl *host; -@@ -1915,6 +2105,10 @@ +@@ -1902,6 +2090,10 @@ void state_panic (cpp) tell the shell script that we failed to allocate an address, and try again later. */ if (onetry) { @@ -310,7 +309,7 @@ if (!quiet) log_info ("Unable to obtain a lease on first try.%s", " Exiting."); -@@ -2519,7 +2713,9 @@ +@@ -2506,7 +2698,9 @@ void destroy_client_lease (lease) free_client_lease (lease, MDL); } @@ -320,7 +319,7 @@ void rewrite_client_leases () { -@@ -2960,6 +3156,54 @@ +@@ -2902,6 +3096,54 @@ void script_write_params (client, prefix int script_go (client) struct client_state *client; { @@ -375,7 +374,7 @@ char *scriptName; char *argv [2]; char **envp; -@@ -3033,6 +3277,7 @@ +@@ -2978,6 +3220,7 @@ int script_go (client) GET_TIME (&cur_time); return (WIFEXITED (wstatus) ? WEXITSTATUS (wstatus) : -WTERMSIG (wstatus)); @@ -383,7 +382,7 @@ } void client_envadd (struct client_state *client, -@@ -3123,6 +3368,9 @@ +@@ -3061,6 +3304,9 @@ void go_daemon () /* Don't become a daemon if the user requested otherwise. */ if (no_daemon) { @@ -393,7 +392,7 @@ write_client_pid_file (); return; } -@@ -3132,6 +3380,10 @@ +@@ -3070,6 +3316,10 @@ void go_daemon () return; state = 1; @@ -404,9 +403,226 @@ /* Stop logging to stderr... */ log_perror = 0; ---- dhcp-3.0.5/common/discover.c.libdhcp4client 2007-03-30 20:54:06.000000000 -0400 -+++ dhcp-3.0.5/common/discover.c 2007-03-30 20:54:06.000000000 -0400 -@@ -121,6 +121,10 @@ +diff -up dhcp-3.0.6/omapip/alloc.c.libdhcp4client dhcp-3.0.6/omapip/alloc.c +--- dhcp-3.0.6/omapip/alloc.c.libdhcp4client 2007-08-15 16:24:55.000000000 -0400 ++++ dhcp-3.0.6/omapip/alloc.c 2007-08-15 16:24:55.000000000 -0400 +@@ -40,6 +40,33 @@ static char copyright[] = + + #include + ++#ifdef LIBDHCP ++/* OK, we need a quick and dirty way of freeing all memory used by libdhcp. ++ All pointers will be stored in a glibc tree on alloc, and removed on free. ++ This is not too expensive for light single-call library use. ++*/ ++#include ++extern void tdestroy (void *root, void (*free_node)(void *nodep)); ++static void *all_pointers=0L; ++static int ptr_comparator(const void *p1, const void *p2) { ++ return ((p1 == p2) ? 0 : ((p1 > p2) ? 1 : -1)); ++} ++ ++static void record_pointer(void *ptr) { ++ tsearch(ptr, &(all_pointers), ptr_comparator); ++} ++ ++static void forget_pointer(void *ptr) { ++ tdelete(ptr, &(all_pointers), ptr_comparator); ++} ++ ++void omapi_free_all_pointers(void) { ++ if (all_pointers != NULL) ++ tdestroy(all_pointers, free); ++ all_pointers = NULL; ++} ++#endif ++ + #if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \ + defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) + struct dmalloc_preamble *dmalloc_list; +@@ -77,7 +104,9 @@ VOIDPTR dmalloc (size, file, line) + return (VOIDPTR)0; + + foo = malloc(len); +- ++#ifdef LIBDHCP ++ record_pointer(foo); ++#endif + if (!foo) + return (VOIDPTR)0; + bar = (VOIDPTR)(foo + DMDOFFSET); +@@ -199,6 +228,9 @@ void dfree (ptr, file, line) + 0, (unsigned char *)ptr + DMDOFFSET, 0, 1, RC_MALLOC); + #endif + free (ptr); ++#ifdef LIBDHCP ++ forget_pointer(ptr); ++#endif + } + + #if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \ +diff -up dhcp-3.0.6/omapip/dispatch.c.libdhcp4client dhcp-3.0.6/omapip/dispatch.c +--- dhcp-3.0.6/omapip/dispatch.c.libdhcp4client 2004-11-24 12:39:17.000000000 -0500 ++++ dhcp-3.0.6/omapip/dispatch.c 2007-08-15 16:24:55.000000000 -0400 +@@ -34,7 +34,7 @@ + + #include + +-static omapi_io_object_t omapi_io_states; ++omapi_io_object_t omapi_io_states; + TIME cur_time; + + OMAPI_OBJECT_ALLOC (omapi_io, +diff -up dhcp-3.0.6/omapip/errwarn.c.libdhcp4client dhcp-3.0.6/omapip/errwarn.c +--- dhcp-3.0.6/omapip/errwarn.c.libdhcp4client 2007-08-15 16:24:55.000000000 -0400 ++++ dhcp-3.0.6/omapip/errwarn.c 2007-08-15 16:24:55.000000000 -0400 +@@ -39,6 +39,11 @@ static char copyright[] = + #include + #include + ++#ifdef LIBDHCP ++#include ++extern LIBDHCP_Control *libdhcp_control; ++#endif ++ + #ifdef DEBUG + int log_perror = -1; + #else +@@ -48,7 +53,9 @@ int log_priority; + void (*log_cleanup) (void); + + #define CVT_BUF_MAX 1023 ++#ifndef LIBDHCP + static char mbuf [CVT_BUF_MAX + 1]; ++#endif + static char fbuf [CVT_BUF_MAX + 1]; + + /* Log an error message, then exit... */ +@@ -58,6 +65,16 @@ void log_fatal (const char * fmt, ... ) + va_list list; + + do_percentm (fbuf, fmt); ++ ++#ifdef LIBDHCP ++ if (libdhcp_control && (libdhcp_control->eh)) { ++ va_start (list, fmt); ++ libdhcp_control->eh(libdhcp_control, LOG_FATAL, fbuf, list); ++ va_end(list); ++ libdhcp_control->finished = 1; ++ return; ++ } ++#else + + /* %Audit% This is log output. %2004.06.17,Safe% + * If we truncate we hope the user can get a hint from the log. +@@ -93,6 +110,7 @@ void log_fatal (const char * fmt, ... ) + if (log_cleanup) + (*log_cleanup) (); + exit (1); ++#endif + } + + /* Log an error message... */ +@@ -103,6 +121,13 @@ int log_error (const char * fmt, ...) + + do_percentm (fbuf, fmt); + ++#ifdef LIBDHCP ++ if (libdhcp_control && libdhcp_control->eh) { ++ va_start (list, fmt); ++ libdhcp_control->eh(libdhcp_control, LOG_ERR, fbuf, list); ++ va_end(list); ++ } ++#else + /* %Audit% This is log output. %2004.06.17,Safe% + * If we truncate we hope the user can get a hint from the log. + */ +@@ -120,7 +145,7 @@ int log_error (const char * fmt, ...) + if (write (STDERR_FILENO, "\n", 1) <= 0) + return 0; + } +- ++#endif + return 0; + } + +@@ -132,6 +157,13 @@ int log_info (const char *fmt, ...) + + do_percentm (fbuf, fmt); + ++#ifdef LIBDHCP ++ if (libdhcp_control && libdhcp_control->eh) { ++ va_start (list, fmt); ++ libdhcp_control->eh(libdhcp_control, LOG_INFO, fbuf, list); ++ va_end(list); ++ } ++#else + /* %Audit% This is log output. %2004.06.17,Safe% + * If we truncate we hope the user can get a hint from the log. + */ +@@ -149,7 +181,7 @@ int log_info (const char *fmt, ...) + if (write (STDERR_FILENO, "\n", 1) <= 0) + return 0; + } +- ++#endif + return 0; + } + +@@ -160,7 +192,13 @@ int log_debug (const char *fmt, ...) + va_list list; + + do_percentm (fbuf, fmt); +- ++#ifdef LIBDHCP ++ if (libdhcp_control && libdhcp_control->eh) { ++ va_start (list, fmt); ++ libdhcp_control->eh(libdhcp_control, LOG_DEBUG, fbuf, list); ++ va_end(list); ++ } ++#else + /* %Audit% This is log output. %2004.06.17,Safe% + * If we truncate we hope the user can get a hint from the log. + */ +@@ -178,7 +216,7 @@ int log_debug (const char *fmt, ...) + if (write (STDERR_FILENO, "\n", 1) <= 0) + return 0; + } +- ++#endif + return 0; + } + +diff -up dhcp-3.0.6/includes/dhcpd.h.libdhcp4client dhcp-3.0.6/includes/dhcpd.h +--- dhcp-3.0.6/includes/dhcpd.h.libdhcp4client 2007-08-15 16:24:55.000000000 -0400 ++++ dhcp-3.0.6/includes/dhcpd.h 2007-08-15 16:24:55.000000000 -0400 +@@ -861,14 +861,6 @@ struct hardware_link { + + typedef void (*tvref_t)(void *, void *, const char *, int); + typedef void (*tvunref_t)(void *, const char *, int); +-struct timeout { +- struct timeout *next; +- TIME when; +- void (*func) PROTO ((void *)); +- void *what; +- tvref_t ref; +- tvunref_t unref; +-}; + + struct protocol { + struct protocol *next; +@@ -1795,7 +1787,6 @@ extern void (*bootp_packet_handler) PROT + struct dhcp_packet *, unsigned, + unsigned int, + struct iaddr, struct hardware *)); +-extern struct timeout *timeouts; + extern omapi_object_type_t *dhcp_type_interface; + #if defined (TRACING) + trace_type_t *interface_trace; +diff -up dhcp-3.0.6/common/discover.c.libdhcp4client dhcp-3.0.6/common/discover.c +--- dhcp-3.0.6/common/discover.c.libdhcp4client 2007-08-15 16:24:55.000000000 -0400 ++++ dhcp-3.0.6/common/discover.c 2007-08-15 16:24:55.000000000 -0400 +@@ -121,6 +121,10 @@ isc_result_t interface_initialize (omapi register that interface with the network I/O software, figure out what subnet it's on, and add it to the list of interfaces. */ @@ -417,7 +633,7 @@ void discover_interfaces (state) int state; { -@@ -139,7 +143,9 @@ +@@ -139,7 +143,9 @@ void discover_interfaces (state) char *s; #endif isc_result_t status; @@ -427,7 +643,7 @@ int wifcount = 0; /* Create an unbound datagram socket to do the SIOCGIFADDR ioctl on. */ -@@ -692,10 +698,17 @@ +@@ -692,10 +698,17 @@ void discover_interfaces (state) log_fatal ("Not configured to listen on any interfaces!"); } @@ -445,9 +661,10 @@ #if defined (HAVE_SETFD) if (fallback_interface) { ---- dhcp-3.0.5/common/alloc.c.libdhcp4client 2007-03-30 20:54:06.000000000 -0400 -+++ dhcp-3.0.5/common/alloc.c 2007-03-30 20:54:06.000000000 -0400 -@@ -1009,7 +1009,11 @@ +diff -up dhcp-3.0.6/common/alloc.c.libdhcp4client dhcp-3.0.6/common/alloc.c +--- dhcp-3.0.6/common/alloc.c.libdhcp4client 2007-08-15 16:24:55.000000000 -0400 ++++ dhcp-3.0.6/common/alloc.c 2007-08-15 16:24:55.000000000 -0400 +@@ -1009,7 +1009,11 @@ int executable_statement_reference (ptr, return 1; } @@ -459,9 +676,10 @@ #if defined (DEBUG_MEMORY_LEAKAGE) || \ defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) ---- dhcp-3.0.5/common/tree.c.libdhcp4client 2007-03-30 20:54:06.000000000 -0400 -+++ dhcp-3.0.5/common/tree.c 2007-03-30 20:54:06.000000000 -0400 -@@ -40,7 +40,7 @@ +diff -up dhcp-3.0.6/common/tree.c.libdhcp4client dhcp-3.0.6/common/tree.c +--- dhcp-3.0.6/common/tree.c.libdhcp4client 2007-08-15 16:24:55.000000000 -0400 ++++ dhcp-3.0.6/common/tree.c 2007-08-15 16:24:55.000000000 -0400 +@@ -40,7 +40,7 @@ static char copyright[] = #include "dhcpd.h" #include @@ -470,7 +688,7 @@ static int do_host_lookup PROTO ((struct data_string *, struct dns_host_entry *)); -@@ -2615,6 +2615,7 @@ +@@ -2615,6 +2615,7 @@ int evaluate_numeric_expression (result, result of that evaluation. There should never be both an expression and a valid data_string. */ @@ -478,9 +696,10 @@ int evaluate_option_cache (result, packet, lease, client_state, in_options, cfg_options, scope, oc, file, line) struct data_string *result; ---- dhcp-3.0.5/common/options.c.libdhcp4client 2007-03-30 20:54:06.000000000 -0400 -+++ dhcp-3.0.5/common/options.c 2007-03-30 20:54:06.000000000 -0400 -@@ -2153,6 +2153,7 @@ +diff -up dhcp-3.0.6/common/options.c.libdhcp4client dhcp-3.0.6/common/options.c +--- dhcp-3.0.6/common/options.c.libdhcp4client 2007-08-15 16:24:55.000000000 -0400 ++++ dhcp-3.0.6/common/options.c 2007-08-15 16:24:55.000000000 -0400 +@@ -2152,6 +2152,7 @@ int fqdn_option_space_encapsulate (resul return 1; } @@ -488,9 +707,10 @@ void option_space_foreach (struct packet *packet, struct lease *lease, struct client_state *client_state, struct option_state *in_options, ---- dhcp-3.0.5/common/dispatch.c.libdhcp4client 2007-03-30 20:54:06.000000000 -0400 -+++ dhcp-3.0.5/common/dispatch.c 2007-03-30 20:54:06.000000000 -0400 -@@ -39,8 +39,24 @@ +diff -up dhcp-3.0.6/common/dispatch.c.libdhcp4client dhcp-3.0.6/common/dispatch.c +--- dhcp-3.0.6/common/dispatch.c.libdhcp4client 2007-08-15 16:24:55.000000000 -0400 ++++ dhcp-3.0.6/common/dispatch.c 2007-08-15 16:24:55.000000000 -0400 +@@ -39,8 +39,24 @@ static char copyright[] = #include "dhcpd.h" @@ -517,7 +737,7 @@ void set_time(TIME t) { -@@ -53,9 +69,41 @@ +@@ -53,9 +69,41 @@ void set_time(TIME t) struct timeval *process_outstanding_timeouts (struct timeval *tvp) { @@ -559,7 +779,7 @@ another: if (timeouts) { struct timeout *t; -@@ -73,9 +121,15 @@ +@@ -73,9 +121,15 @@ struct timeval *process_outstanding_time tvp -> tv_sec = timeouts -> when; tvp -> tv_usec = 0; } @@ -575,7 +795,7 @@ } /* Wait for packets to come in using select(). When one does, call -@@ -104,13 +158,28 @@ +@@ -104,13 +158,28 @@ void add_timeout (when, where, what, ref tvref_t ref; tvunref_t unref; { @@ -606,7 +826,7 @@ if (t) t -> next = q -> next; else -@@ -119,7 +188,29 @@ +@@ -119,7 +188,29 @@ void add_timeout (when, where, what, ref } t = q; } @@ -636,7 +856,7 @@ /* If we didn't supersede a timeout, allocate a timeout structure now. */ if (!q) { -@@ -128,7 +219,7 @@ +@@ -128,7 +219,7 @@ void add_timeout (when, where, what, ref free_timeouts = q -> next; } else { q = ((struct timeout *) @@ -645,7 +865,7 @@ if (!q) log_fatal ("add_timeout: no memory!"); } -@@ -158,22 +249,76 @@ +@@ -158,22 +249,76 @@ void add_timeout (when, where, what, ref if (t -> next -> when > q -> when) { q -> next = t -> next; t -> next = q; @@ -722,7 +942,7 @@ t = (struct timeout *)0; for (q = timeouts; q; q = q -> next) { if (q -> func == where && q -> what == what) { -@@ -193,10 +338,15 @@ +@@ -193,10 +338,15 @@ void cancel_timeout (where, what) q -> next = free_timeouts; free_timeouts = q; } @@ -738,7 +958,7 @@ struct timeout *t, *n; for (t = timeouts; t; t = n) { n = t -> next; -@@ -205,13 +355,20 @@ +@@ -205,13 +355,20 @@ void cancel_all_timeouts () t -> next = free_timeouts; free_timeouts = t; } @@ -759,9 +979,10 @@ } +#endif } ---- dhcp-3.0.5/dst/hmac_link.c.libdhcp4client 2001-02-22 02:22:08.000000000 -0500 -+++ dhcp-3.0.5/dst/hmac_link.c 2007-03-30 20:54:06.000000000 -0400 -@@ -38,6 +38,10 @@ +diff -up dhcp-3.0.6/dst/hmac_link.c.libdhcp4client dhcp-3.0.6/dst/hmac_link.c +--- dhcp-3.0.6/dst/hmac_link.c.libdhcp4client 2001-02-22 02:22:08.000000000 -0500 ++++ dhcp-3.0.6/dst/hmac_link.c 2007-08-15 16:24:55.000000000 -0400 +@@ -38,6 +38,10 @@ static const char rcsid[] = "$Header: /p #include "dst_internal.h" @@ -772,7 +993,7 @@ #ifdef USE_MD5 # include "md5.h" # ifndef _MD5_H_ -@@ -86,7 +90,11 @@ +@@ -86,7 +90,11 @@ dst_hmac_md5_sign(const int mode, DST_KE MD5_CTX *ctx = NULL; if (mode & SIG_MODE_INIT) @@ -784,7 +1005,7 @@ else if (context) ctx = (MD5_CTX *) *context; if (ctx == NULL) -@@ -153,7 +161,11 @@ +@@ -153,7 +161,11 @@ dst_hmac_md5_verify(const int mode, DST_ MD5_CTX *ctx = NULL; if (mode & SIG_MODE_INIT) @@ -796,7 +1017,7 @@ else if (context) ctx = (MD5_CTX *) *context; if (ctx == NULL) -@@ -217,8 +229,11 @@ +@@ -217,8 +229,11 @@ dst_buffer_to_hmac_md5(DST_KEY *dkey, co if (dkey == NULL || key == NULL || keylen < 0) return (-1); @@ -809,7 +1030,7 @@ return (-2); memset(hkey->hk_ipad, 0, sizeof(hkey->hk_ipad)); -@@ -347,7 +362,11 @@ +@@ -347,7 +362,11 @@ dst_hmac_md5_key_from_file_format(DST_KE if (eol == NULL) return (-4); len = eol - p; @@ -821,7 +1042,7 @@ memcpy(tmp, p, len); *(tmp + len) = 0x0; key_len = b64_pton((char *)tmp, key, HMAC_LEN+1); /* see above */ -@@ -439,8 +458,11 @@ +@@ -439,8 +458,11 @@ dst_hmac_md5_generate_key(DST_KEY *key, return(0); len = size > 64 ? 64 : size; @@ -834,7 +1055,7 @@ n = dst_random(DST_RAND_SEMI, len, buff); n += dst_random(DST_RAND_KEY, len, buff); if (n <= len) { /* failed getting anything */ -@@ -463,7 +485,11 @@ +@@ -463,7 +485,11 @@ dst_hmac_md5_init() { if (dst_t_func[KEY_HMAC_MD5] != NULL) return (1); @@ -846,220 +1067,9 @@ if (dst_t_func[KEY_HMAC_MD5] == NULL) return (0); memset(dst_t_func[KEY_HMAC_MD5], 0, sizeof(struct dst_func)); ---- dhcp-3.0.5/includes/dhcpd.h.libdhcp4client 2007-03-30 20:54:06.000000000 -0400 -+++ dhcp-3.0.5/includes/dhcpd.h 2007-03-30 20:54:06.000000000 -0400 -@@ -855,14 +855,6 @@ - - typedef void (*tvref_t)(void *, void *, const char *, int); - typedef void (*tvunref_t)(void *, const char *, int); --struct timeout { -- struct timeout *next; -- TIME when; -- void (*func) PROTO ((void *)); -- void *what; -- tvref_t ref; -- tvunref_t unref; --}; - - struct protocol { - struct protocol *next; -@@ -1789,7 +1781,6 @@ - struct dhcp_packet *, unsigned, - unsigned int, - struct iaddr, struct hardware *)); --extern struct timeout *timeouts; - extern omapi_object_type_t *dhcp_type_interface; - #if defined (TRACING) - trace_type_t *interface_trace; ---- dhcp-3.0.5/omapip/alloc.c.libdhcp4client 2007-03-30 20:54:06.000000000 -0400 -+++ dhcp-3.0.5/omapip/alloc.c 2007-03-30 20:54:06.000000000 -0400 -@@ -40,6 +40,33 @@ - - #include - -+#ifdef LIBDHCP -+/* OK, we need a quick and dirty way of freeing all memory used by libdhcp. -+ All pointers will be stored in a glibc tree on alloc, and removed on free. -+ This is not too expensive for light single-call library use. -+*/ -+#include -+extern void tdestroy (void *root, void (*free_node)(void *nodep)); -+static void *all_pointers=0L; -+static int ptr_comparator(const void *p1, const void *p2) { -+ return ((p1 == p2) ? 0 : ((p1 > p2) ? 1 : -1)); -+} -+ -+static void record_pointer(void *ptr) { -+ tsearch(ptr, &(all_pointers), ptr_comparator); -+} -+ -+static void forget_pointer(void *ptr) { -+ tdelete(ptr, &(all_pointers), ptr_comparator); -+} -+ -+void omapi_free_all_pointers(void) { -+ if (all_pointers != NULL) -+ tdestroy(all_pointers, free); -+ all_pointers = NULL; -+} -+#endif -+ - #if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \ - defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT) - struct dmalloc_preamble *dmalloc_list; -@@ -77,7 +104,9 @@ - return (VOIDPTR)0; - - foo = malloc(len); -- -+#ifdef LIBDHCP -+ record_pointer(foo); -+#endif - if (!foo) - return (VOIDPTR)0; - bar = (VOIDPTR)(foo + DMDOFFSET); -@@ -199,6 +228,9 @@ - 0, (unsigned char *)ptr + DMDOFFSET, 0, 1, RC_MALLOC); - #endif - free (ptr); -+#ifdef LIBDHCP -+ forget_pointer(ptr); -+#endif - } - - #if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \ ---- dhcp-3.0.5/omapip/dispatch.c.libdhcp4client 2004-11-24 12:39:17.000000000 -0500 -+++ dhcp-3.0.5/omapip/dispatch.c 2007-03-30 20:54:06.000000000 -0400 -@@ -34,7 +34,7 @@ - - #include - --static omapi_io_object_t omapi_io_states; -+omapi_io_object_t omapi_io_states; - TIME cur_time; - - OMAPI_OBJECT_ALLOC (omapi_io, ---- dhcp-3.0.5/omapip/errwarn.c.libdhcp4client 2007-03-30 20:54:06.000000000 -0400 -+++ dhcp-3.0.5/omapip/errwarn.c 2007-03-30 20:54:06.000000000 -0400 -@@ -39,6 +39,11 @@ - #include - #include - -+#ifdef LIBDHCP -+#include -+extern LIBDHCP_Control *libdhcp_control; -+#endif -+ - #ifdef DEBUG - int log_perror = -1; - #else -@@ -48,7 +53,9 @@ - void (*log_cleanup) (void); - - #define CVT_BUF_MAX 1023 -+#ifndef LIBDHCP - static char mbuf [CVT_BUF_MAX + 1]; -+#endif - static char fbuf [CVT_BUF_MAX + 1]; - - /* Log an error message, then exit... */ -@@ -58,6 +65,16 @@ - va_list list; - - do_percentm (fbuf, fmt); -+ -+#ifdef LIBDHCP -+ if (libdhcp_control && (libdhcp_control->eh)) { -+ va_start (list, fmt); -+ libdhcp_control->eh(libdhcp_control, LOG_FATAL, fbuf, list); -+ va_end(list); -+ libdhcp_control->finished = 1; -+ return; -+ } -+#else - - /* %Audit% This is log output. %2004.06.17,Safe% - * If we truncate we hope the user can get a hint from the log. -@@ -93,6 +110,7 @@ - if (log_cleanup) - (*log_cleanup) (); - exit (1); -+#endif - } - - /* Log an error message... */ -@@ -103,6 +121,13 @@ - - do_percentm (fbuf, fmt); - -+#ifdef LIBDHCP -+ if (libdhcp_control && libdhcp_control->eh) { -+ va_start (list, fmt); -+ libdhcp_control->eh(libdhcp_control, LOG_ERR, fbuf, list); -+ va_end(list); -+ } -+#else - /* %Audit% This is log output. %2004.06.17,Safe% - * If we truncate we hope the user can get a hint from the log. - */ -@@ -120,7 +145,7 @@ - if (write (STDERR_FILENO, "\n", 1) <= 0) - return 0; - } -- -+#endif - return 0; - } - -@@ -132,6 +157,13 @@ - - do_percentm (fbuf, fmt); - -+#ifdef LIBDHCP -+ if (libdhcp_control && libdhcp_control->eh) { -+ va_start (list, fmt); -+ libdhcp_control->eh(libdhcp_control, LOG_INFO, fbuf, list); -+ va_end(list); -+ } -+#else - /* %Audit% This is log output. %2004.06.17,Safe% - * If we truncate we hope the user can get a hint from the log. - */ -@@ -149,7 +181,7 @@ - if (write (STDERR_FILENO, "\n", 1) <= 0) - return 0; - } -- -+#endif - return 0; - } - -@@ -160,7 +192,13 @@ - va_list list; - - do_percentm (fbuf, fmt); -- -+#ifdef LIBDHCP -+ if (libdhcp_control && libdhcp_control->eh) { -+ va_start (list, fmt); -+ libdhcp_control->eh(libdhcp_control, LOG_DEBUG, fbuf, list); -+ va_end(list); -+ } -+#else - /* %Audit% This is log output. %2004.06.17,Safe% - * If we truncate we hope the user can get a hint from the log. - */ -@@ -178,7 +216,7 @@ - if (write (STDERR_FILENO, "\n", 1) <= 0) - return 0; - } -- -+#endif - return 0; - } - ---- dhcp-3.0.5/Makefile.dist.libdhcp4client 2004-06-10 13:59:10.000000000 -0400 -+++ dhcp-3.0.5/Makefile.dist 2007-03-30 20:54:06.000000000 -0400 +diff -up dhcp-3.0.6/Makefile.dist.libdhcp4client dhcp-3.0.6/Makefile.dist +--- dhcp-3.0.6/Makefile.dist.libdhcp4client 2004-06-10 13:59:10.000000000 -0400 ++++ dhcp-3.0.6/Makefile.dist 2007-08-15 16:24:55.000000000 -0400 @@ -22,7 +22,7 @@ # http://www.isc.org/ @@ -1069,9 +1079,10 @@ all: @for dir in ${SUBDIRS}; do \ ---- dhcp-3.0.5/configure.libdhcp4client 2004-09-10 17:02:30.000000000 -0400 -+++ dhcp-3.0.5/configure 2007-03-30 20:54:06.000000000 -0400 -@@ -246,7 +246,7 @@ +diff -up dhcp-3.0.6/configure.libdhcp4client dhcp-3.0.6/configure +--- dhcp-3.0.6/configure.libdhcp4client 2004-09-10 17:02:30.000000000 -0400 ++++ dhcp-3.0.6/configure 2007-08-15 16:24:55.000000000 -0400 +@@ -246,7 +246,7 @@ if [ ! -d $workname ]; then fi if [ x"$dirs" = x ]; then diff --git a/dhcp-3.0.5-manpages.patch b/dhcp-3.0.6-manpages.patch similarity index 74% rename from dhcp-3.0.5-manpages.patch rename to dhcp-3.0.6-manpages.patch index 73ea521..bf7fd00 100644 --- a/dhcp-3.0.5-manpages.patch +++ b/dhcp-3.0.6-manpages.patch @@ -1,77 +1,8 @@ ---- dhcp-3.0.5/client/dhclient-script.8.manpages 2005-09-28 15:17:08.000000000 -0400 -+++ dhcp-3.0.5/client/dhclient-script.8 2007-04-26 14:52:13.000000000 -0400 -@@ -47,7 +47,7 @@ - exit hooks provided (see HOOKS for details). These hooks will allow the - user to override the default behaviour of the client in creating a - .B /etc/resolv.conf --file. -+file, and to handle DHCP options not handled by default. - .PP - No standard client script exists for some operating systems, even though - the actual client may work, so a pioneering user may well need to create -@@ -91,6 +91,27 @@ - .B ETCDIR/dhclient-exit-hooks - script can modify the valid of exit_status to change the exit status - of dhclient-script. -+.PP -+Immediately after dhclient brings an interface UP with a new IP address, -+subnet mask, and routes, in the REBOOT/BOUND states, it will check for the -+existence of an executable -+.B ETCDIR/dhclient-up-hooks -+script, and source it if found. This script can handle DHCP options in -+the environment that are not handled by default. A per-interface -+.B ETCDIR/dhclient-${IF}-up-hooks -+script will override the generic script and be sourced when interface -+$IF has been brought up. -+.PP -+Immediately before dhclient brings an interface DOWN, removing its IP -+address, subnet mask, and routes, in the STOP/RELEASE states, it will -+check for the existence of an executable -+.B ETCDIR/dhclient-down-hooks -+script, and source it if found. This script can handle DHCP options in -+the environment that are not handled by default. A per-interface -+.B ETCDIR/dhclient-${IF}-down-hooks -+script will override the generic script and be sourced when interface -+$IF is about to be brought down. -+ - .SH OPERATION - When dhclient needs to invoke the client configuration script, it - defines a set of variables in the environment, and then invokes ---- dhcp-3.0.5/client/dhclient.conf.5.manpages 2005-06-16 15:40:13.000000000 -0400 -+++ dhcp-3.0.5/client/dhclient.conf.5 2007-04-26 14:51:02.000000000 -0400 -@@ -185,7 +185,8 @@ - options. Only the option names should be specified in the request - statement - not option parameters. By default, the DHCP server - requests the subnet-mask, broadcast-address, time-offset, routers, --domain-name, domain-name-servers and host-name options. -+domain-name, domain-name-servers, host-name, nis-domain, nis-servers, -+and ntp-servers options. - .PP - In some cases, it may be desirable to send no parameter request list - at all. To do this, simply write the request statement but specify -@@ -581,6 +582,18 @@ - Whenever the client tries to renew the lease, it will use that same - media type. The lease must expire before the client will go back to - cycling through media types. -+.PP -+ \fBbootp-broadcast-always;\fR -+.PP -+The -+.B bootp-broadcast-always -+statement instructs dhclient to always set the bootp broadcast flag in -+request packets, so that servers will always broadcast replies. -+This is equivalent to supplying the dhclient -B argument, and has -+the same effect as specifying 'always-broadcast' in the server's dhcpd.conf. -+This option is provided as a Red Hat extension to enable dhclient to work -+on IBM zSeries z/OS Linux guests . -+.PP - .SH SAMPLE - The following configuration file is used on a laptop running NetBSD - 1.3. The laptop has an IP alias of 192.5.5.213, and has one ---- dhcp-3.0.5/client/dhclient.8.manpages 2007-04-26 14:51:02.000000000 -0400 -+++ dhcp-3.0.5/client/dhclient.8 2007-04-26 14:51:02.000000000 -0400 -@@ -85,6 +85,28 @@ - .B -x +diff -up dhcp-3.0.6/client/dhclient.8.manpages dhcp-3.0.6/client/dhclient.8 +--- dhcp-3.0.6/client/dhclient.8.manpages 2007-05-01 16:42:55.000000000 -0400 ++++ dhcp-3.0.6/client/dhclient.8 2007-08-15 12:08:48.000000000 -0400 +@@ -82,6 +82,28 @@ relay + .B -w ] [ +.B -I @@ -92,25 +23,25 @@ +.I request option list +] +[ -+.B -T ++.B -T +.I timeout +] +[ .I if0 [ .I ...ifN -@@ -273,6 +295,107 @@ - -s dhclient-script environment, which would allow applications running - in that environment to handle options they do not know about in advance - - this is a Red Hat extension to support dhcdbd and NetworkManager. +@@ -265,6 +287,110 @@ than waiting until it has acquired an IP + supplying the + .B -nw + flag. +.PP -+The -I argument allows you to specify the dhcp-client-identifier string, , -+to be sent to the dhcp server on the command line. It is equivalent to the -+top level dhclient.conf statement: ++The -I argument allows you to specify the dhcp-client-identifier string, ++, to be sent to the dhcp server on the command line. It is equivalent to ++the top level dhclient.conf statement: +.br + \fBsend dhcp-client-identifier "";\fR +.br -+The -I command line option will override any top level dhclient.conf ++The -I command line option will override any top level dhclient.conf + 'send dhcp-client-identifier' statement, but more specific per-interface + 'interface "X" { send dhcp-client-identifier...; }' statements in dhclient.conf +will override the -I command line option for interface "X". @@ -123,15 +54,15 @@ +the same effect as specifying 'always-broadcast' in the server's dhcpd.conf. +This option is provided as a Red Hat extension to enable dhclient to work +on IBM zSeries z/OS Linux guests. -+.PP ++.PP +The -H option allows you to specify the DHCP host-name option +to send to the server on the dhclient command line. It is equivalent to the +top level dhclient.conf statement: +.br +\f send host-name "";\fR +.br -+The -H option will override any top level dhclient.conf -+ 'send host-name' statement, but more specific per-interface ++The -H option will override any top level dhclient.conf ++ 'send host-name' statement, but more specific per-interface + 'interface "X" { send host-name...;' statements in dhclient.conf +will override the -H command line option for interface "X". +The host-name option only specifies the client's host name prefix, to which @@ -141,7 +72,7 @@ +Only one -H option may be specified. +The -H option is provided as a Red Hat extension to simplify +configuration of clients of DHCP servers that require the host-name option -+to be sent (eg. some modern cable modems), and for dynamic DNS updates (DDNS). ++to be sent (eg. some modern cable modems), and for dynamic DNS updates (DDNS). +.PP +The -F option allows you to specify the DHCP fqdn.fqdn option +to send to the server on the dhclient command line. It is equivalent to the @@ -149,8 +80,8 @@ +.br +\f send fqdn.fqdn "";\fR +.br -+The -F option will override any top level dhclient.conf -+ 'send fqdn.fqdn' statement, but more specific per-interface ++The -F option will override any top level dhclient.conf ++ 'send fqdn.fqdn' statement, but more specific per-interface + 'interface "X" { send fqdn.fqdn...;' statements in dhclient.conf +will override the -F command line option for interface "X". +This option cannot be used with the -H option. @@ -158,11 +89,11 @@ +host, which the server may use for dynamic DNS updates. +Only one -F option may be specified. +The -F option is provided as a Red Hat extension to simplify -+configuration of DDNS. ++configuration of DDNS. +.PP -+The -T option allows you to specify the time after which ++The -T option allows you to specify the time after which +the dhclient will decide that no DHCP servers can be contacted when -+no responses have been received. It is equivalent to the ++no responses have been received. It is equivalent to the +.br +\f timeout ;\fR +.br @@ -170,54 +101,208 @@ +.br +This option is provided as a Red Hat extension. +.PP -+The -V option allows you to specify the DHCP -+vendor-class-identifier option to send to the server on the dhclient command line. -+It is equivalent to the top level dhclient.conf statement: ++The -V option allows you to specify the DHCP ++vendor-class-identifier option to send to the server on the dhclient command ++line. It is equivalent to the top level dhclient.conf statement: +.br +\f send vendor-class-identifier "";\fR +.br -+The -V option will override any top level dhclient.conf -+ 'send vendor-class-identifier' statement, but more specific per-interface ++The -V option will override any top level ++dhclient.conf ++ 'send vendor-class-identifier' statement, but more specific per-interface + 'interface "X" { send vendor-class-identifier...;' statements in dhclient.conf -+will override the -V command line option for interface "X". -+The -V option is provided as a Red Hat extension to simplify -+configuration of clients of DHCP servers that require the vendor-class-identifier option -+to be sent. ++will override the -V command line option for ++interface "X". ++The -V option is provided as a Red Hat extension to ++simplify configuration of clients of DHCP servers that require the ++vendor-class-identifier option to be sent. +.PP -+The -R option allows you to specify the list of options the -+client is to request from the server on the dhclient command line. ++The -R option allows you to specify the list of options ++the client is to request from the server on the dhclient command line. +The option list must be a single string, consisting of option names separated +by at least one comma and optional space characters. The default option list -+is : ++is: +.br -+ subnet-mask, broadcast-address, time-offset, routers, ++ subnet-mask, broadcast-address, time-offset, routers, +.br -+ domain-name, domain-name-servers, host-name, nis-domain, ++ domain-name, domain-name-servers, host-name, nis-domain, +.br + nis-servers, ntp-servers +.br -+You can specify a different list of options to request with the -R