From 09ba34e687b5415f8c23fbf29c86fb791099cbf5 Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Mon, 1 Apr 2002 07:59:50 +0000 Subject: [PATCH] Resolve conflicts: * $FreeBSD$ line. * Prefer strlcpy to strcpy (r1.6). * dhclient-script pathname. --- contrib/isc-dhcp/client/clparse.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/contrib/isc-dhcp/client/clparse.c b/contrib/isc-dhcp/client/clparse.c index f3cdf06592a9..d9be6a01c401 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" "$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);