Resolve conflicts:
* $FreeBSD$ line. * Prefer strlcpy to strcpy (r1.6). * dhclient-script pathname.
This commit is contained in:
parent
3d7dd7e8b8
commit
09ba34e687
@ -3,7 +3,7 @@
|
||||
Parser for dhclient config and lease files... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2001 Internet Software Consortium.
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: clparse.c,v 1.62.2.1 2001/06/01 17:26:44 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n"
|
||||
"$Id: clparse.c,v 1.62.2.2 2002/02/09 03:13:17 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n"
|
||||
"$FreeBSD$\n";
|
||||
#endif /* not lint */
|
||||
|
||||
@ -95,6 +95,7 @@ isc_result_t read_client_conf ()
|
||||
top_level_config.script_name = path_dhclient_script;
|
||||
top_level_config.requested_options = default_requested_options;
|
||||
top_level_config.omapi_port = -1;
|
||||
top_level_config.do_forward_update = 1;
|
||||
|
||||
group_allocate (&top_level_config.on_receipt, MDL);
|
||||
if (!top_level_config.on_receipt)
|
||||
@ -463,6 +464,23 @@ void parse_client_statement (cfile, ip, config)
|
||||
parse_semi (cfile);
|
||||
return;
|
||||
|
||||
case DO_FORWARD_UPDATE:
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (!strcasecmp (val, "on") ||
|
||||
!strcasecmp (val, "true"))
|
||||
config -> do_forward_update = 1;
|
||||
else if (!strcasecmp (val, "off") ||
|
||||
!strcasecmp (val, "false"))
|
||||
config -> do_forward_update = 0;
|
||||
else {
|
||||
parse_warn (cfile, "expecting boolean value.");
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
parse_semi (cfile);
|
||||
return;
|
||||
|
||||
case REBOOT:
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
parse_lease_time (cfile, &config -> reboot_timeout);
|
||||
|
Loading…
x
Reference in New Issue
Block a user