Parser for dhclient config and lease files... */
/*
- * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2011 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
top_level_config.retry_interval = 300;
top_level_config.backoff_cutoff = 15;
top_level_config.initial_interval = 3;
+
+ /*
+ * RFC 2131, section 4.4.1 specifies that the client SHOULD wait a
+ * random time between 1 and 10 seconds. However, we choose to not
+ * implement this default. If user is inclined to really have that
+ * delay, he is welcome to do so, using 'initial-delay X;' parameter
+ * in config file.
+ */
+ top_level_config.initial_delay = 0;
+
top_level_config.bootp_policy = P_ACCEPT;
top_level_config.script_name = path_dhclient_script;
top_level_config.requested_options = default_requested_options;
const char *val;
int token;
isc_result_t status;
-
+
if ((file = open (name, O_RDONLY)) < 0)
return uerr2isc (errno);
parse_lease_time (cfile, &config -> initial_interval);
return;
+ case INITIAL_DELAY:
+ token = next_token (&val, (unsigned *)0, cfile);
+ parse_lease_time (cfile, &config -> initial_delay);
+ return;
+
case SCRIPT:
token = next_token (&val, (unsigned *)0, cfile);
parse_string (cfile, &config -> script_name, (unsigned *)0);
skip_to_semi (cfile);
return 0;
}
-