udhcp: tweak udhcpd.conf example and comments. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -319,7 +319,7 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
|
||||
bb_info_msg("%s (v"BB_VER") started", applet_name);
|
||||
|
||||
option = find_option(server_config.options, DHCP_LEASE_TIME);
|
||||
server_config.max_lease_sec = LEASE_TIME;
|
||||
server_config.max_lease_sec = DEFAULT_LEASE_TIME;
|
||||
if (option) {
|
||||
move_from_unaligned32(server_config.max_lease_sec, option->data + OPT_DATA);
|
||||
server_config.max_lease_sec = ntohl(server_config.max_lease_sec);
|
||||
|
||||
@@ -7,8 +7,8 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
|
||||
|
||||
/* Defaults you may want to tweak */
|
||||
/* Default max_lease_sec */
|
||||
#define LEASE_TIME (60*60*24 * 10)
|
||||
#define LEASES_FILE CONFIG_DHCPD_LEASES_FILE
|
||||
#define DEFAULT_LEASE_TIME (60*60*24 * 10)
|
||||
#define LEASES_FILE CONFIG_DHCPD_LEASES_FILE
|
||||
/* Where to find the DHCP server configuration file */
|
||||
#define DHCPD_CONF_FILE "/etc/udhcpd.conf"
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ enum {
|
||||
/* DHCP protocol. See RFC 2131 */
|
||||
#define DHCP_MAGIC 0x63825363
|
||||
|
||||
/* DHCP option codes (partial list). See RFC 2132.
|
||||
/* DHCP option codes (partial list). See RFC 2132 and
|
||||
* http://www.iana.org/assignments/bootp-dhcp-parameters/
|
||||
* Commented out options are handled by common option machinery,
|
||||
* uncommented ones have spacial cases (grep for them to see).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user