diff options
Diffstat (limited to 'contrib/isc-dhcp/client/clparse.c')
-rw-r--r-- | contrib/isc-dhcp/client/clparse.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/contrib/isc-dhcp/client/clparse.c b/contrib/isc-dhcp/client/clparse.c index 7cd8529..e59e02f 100644 --- a/contrib/isc-dhcp/client/clparse.c +++ b/contrib/isc-dhcp/client/clparse.c @@ -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"; #endif /* not lint */ #include "dhcpd.h" @@ -92,6 +92,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) @@ -460,6 +461,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); |