diff options
author | mbr <mbr@FreeBSD.org> | 2004-06-26 10:37:42 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2004-06-26 10:37:42 +0000 |
commit | 4e40f399fecf9d0f0e8ca17159648ad46ea9f86c (patch) | |
tree | d903be4110c281897d6065df90848bd752b88210 /contrib/isc-dhcp/client/clparse.c | |
parent | 1255e60c4d80338ad1bef8f82845886b69b802bf (diff) | |
download | FreeBSD-src-4e40f399fecf9d0f0e8ca17159648ad46ea9f86c.zip FreeBSD-src-4e40f399fecf9d0f0e8ca17159648ad46ea9f86c.tar.gz |
Resolve conflicts.
Diffstat (limited to 'contrib/isc-dhcp/client/clparse.c')
-rw-r--r-- | contrib/isc-dhcp/client/clparse.c | 61 |
1 files changed, 27 insertions, 34 deletions
diff --git a/contrib/isc-dhcp/client/clparse.c b/contrib/isc-dhcp/client/clparse.c index e07b3cf..e610bb2 100644 --- a/contrib/isc-dhcp/client/clparse.c +++ b/contrib/isc-dhcp/client/clparse.c @@ -3,39 +3,30 @@ Parser for dhclient config and lease files... */ /* - * Copyright (c) 1996-2002 Internet Software Consortium. - * All rights reserved. + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1996-2003 by Internet Software Consortium * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of The Internet Software Consortium nor the names - * of its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND - * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * Internet Systems Consortium, Inc. + * 950 Charter Street + * Redwood City, CA 94063 + * <info@isc.org> + * http://www.isc.org/ * - * This software has been written for the Internet Software Consortium + * This software has been written for Internet Systems Consortium * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc. - * To learn more about the Internet Software Consortium, see + * To learn more about Internet Systems Consortium, see * ``http://www.isc.org/''. To learn more about Vixie Enterprises, * see ``http://www.vix.com''. To learn more about Nominum, Inc., see * ``http://www.nominum.com''. @@ -43,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: clparse.c,v 1.62.2.4 2003/02/10 00:39:57 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n" +"$Id: clparse.c,v 1.62.2.6 2004/06/10 17:59:11 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n" "$FreeBSD$\n"; #endif /* not lint */ @@ -842,7 +833,7 @@ void parse_client_lease_statement (cfile, is_static) struct parse *cfile; int is_static; { - struct client_lease *lease, *lp, *pl; + struct client_lease *lease, *lp, *pl, *next; struct interface_info *ip = (struct interface_info *)0; int token; const char *val; @@ -902,17 +893,19 @@ void parse_client_lease_statement (cfile, is_static) lease list looking for a lease with the same address, and if we find it, toss it. */ pl = (struct client_lease *)0; - for (lp = client -> leases; lp; lp = lp -> next) { + for (lp = client -> leases; lp; lp = next) { + next = lp -> next; if (lp -> address.len == lease -> address.len && !memcmp (lp -> address.iabuf, lease -> address.iabuf, lease -> address.len)) { if (pl) - pl -> next = lp -> next; + pl -> next = next; else - client -> leases = lp -> next; + client -> leases = next; destroy_client_lease (lp); break; - } + } else + pl = lp; } /* If this is a preloaded lease, just put it on the list of recorded |