aboutsummaryrefslogtreecommitdiff
path: root/contrib/isc-dhcp/common
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2003-01-16 07:04:57 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2003-01-16 07:04:57 +0000
commit5ad7270f30563f9e223343950b9d85f78b3be537 (patch)
treed97161f30972714717408dbf20ff787d5e076488 /contrib/isc-dhcp/common
parent8a71375ab66e9385345261310d853884ee6c34ca (diff)
downloadsrc-5ad7270f30563f9e223343950b9d85f78b3be537.tar.gz
src-5ad7270f30563f9e223343950b9d85f78b3be537.zip
Import isc-dhcpd-3.0.1rc11.
This fixes a security vulnerability in the bundled resolver library. Requested by: scottl(re)
Notes
Notes: svn path=/vendor/isc-dhcp/dist/; revision=109357
Diffstat (limited to 'contrib/isc-dhcp/common')
-rw-r--r--contrib/isc-dhcp/common/alloc.c4
-rw-r--r--contrib/isc-dhcp/common/bpf.c4
-rw-r--r--contrib/isc-dhcp/common/comapi.c4
-rw-r--r--contrib/isc-dhcp/common/conflex.c2
-rw-r--r--contrib/isc-dhcp/common/ctrace.c2
-rw-r--r--contrib/isc-dhcp/common/dhcp-eval.52
-rw-r--r--contrib/isc-dhcp/common/dhcp-options.54
-rw-r--r--contrib/isc-dhcp/common/discover.c4
-rw-r--r--contrib/isc-dhcp/common/dispatch.c4
-rw-r--r--contrib/isc-dhcp/common/dlpi.c4
-rw-r--r--contrib/isc-dhcp/common/dns.c4
-rw-r--r--contrib/isc-dhcp/common/ethernet.c4
-rw-r--r--contrib/isc-dhcp/common/execute.c4
-rw-r--r--contrib/isc-dhcp/common/fddi.c4
-rw-r--r--contrib/isc-dhcp/common/icmp.c4
-rw-r--r--contrib/isc-dhcp/common/inet.c4
-rw-r--r--contrib/isc-dhcp/common/lpf.c4
-rw-r--r--contrib/isc-dhcp/common/memory.c4
-rw-r--r--contrib/isc-dhcp/common/nit.c4
-rw-r--r--contrib/isc-dhcp/common/options.c2
-rw-r--r--contrib/isc-dhcp/common/packet.c4
-rw-r--r--contrib/isc-dhcp/common/parse.c93
-rw-r--r--contrib/isc-dhcp/common/print.c4
-rw-r--r--contrib/isc-dhcp/common/raw.c4
-rw-r--r--contrib/isc-dhcp/common/resolv.c4
-rw-r--r--contrib/isc-dhcp/common/socket.c4
-rw-r--r--contrib/isc-dhcp/common/tables.c4
-rw-r--r--contrib/isc-dhcp/common/tr.c4
-rw-r--r--contrib/isc-dhcp/common/tree.c4
-rw-r--r--contrib/isc-dhcp/common/upf.c4
30 files changed, 113 insertions, 88 deletions
diff --git a/contrib/isc-dhcp/common/alloc.c b/contrib/isc-dhcp/common/alloc.c
index 5ed0204e596c..051cbab2e391 100644
--- a/contrib/isc-dhcp/common/alloc.c
+++ b/contrib/isc-dhcp/common/alloc.c
@@ -3,7 +3,7 @@
Memory allocation... */
/*
- * 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: alloc.c,v 1.53.2.8 2001/10/18 20:30:02 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: alloc.c,v 1.53.2.9 2002/11/17 02:26:56 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/bpf.c b/contrib/isc-dhcp/common/bpf.c
index c59c571ae2bd..fd47735d773c 100644
--- a/contrib/isc-dhcp/common/bpf.c
+++ b/contrib/isc-dhcp/common/bpf.c
@@ -3,7 +3,7 @@
BPF socket interface code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
+ * Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,7 @@
#ifndef lint
static char copyright[] =
-"$Id: bpf.c,v 1.48.2.2 2002/06/08 09:29:16 murray Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bpf.c,v 1.48.2.3 2002/11/17 02:26:56 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/comapi.c b/contrib/isc-dhcp/common/comapi.c
index a038903fb283..52476eea0832 100644
--- a/contrib/isc-dhcp/common/comapi.c
+++ b/contrib/isc-dhcp/common/comapi.c
@@ -3,7 +3,7 @@
OMAPI object interfaces for the DHCP server. */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
+ * Copyright (c) 1999-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -50,7 +50,7 @@
#ifndef lint
static char copyright[] =
-"$Id: comapi.c,v 1.9.2.5 2001/10/18 20:09:59 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: comapi.c,v 1.9.2.6 2002/11/17 02:26:56 dhankins Exp $ Copyright (c) 1999-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/conflex.c b/contrib/isc-dhcp/common/conflex.c
index 34b6ab7c9afb..761be2689031 100644
--- a/contrib/isc-dhcp/common/conflex.c
+++ b/contrib/isc-dhcp/common/conflex.c
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$Id: conflex.c,v 1.92.2.5 2002/02/09 03:15:17 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: conflex.c,v 1.92.2.6 2002/11/17 02:26:56 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/ctrace.c b/contrib/isc-dhcp/common/ctrace.c
index bea933cb433c..6dcddffd9a92 100644
--- a/contrib/isc-dhcp/common/ctrace.c
+++ b/contrib/isc-dhcp/common/ctrace.c
@@ -3,7 +3,7 @@
Subroutines that support dhcp tracing... */
/*
- * Copyright (c) 2001 Internet Software Consortium.
+ * Copyright (c) 2001-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/contrib/isc-dhcp/common/dhcp-eval.5 b/contrib/isc-dhcp/common/dhcp-eval.5
index e87c617026e0..539302beed18 100644
--- a/contrib/isc-dhcp/common/dhcp-eval.5
+++ b/contrib/isc-dhcp/common/dhcp-eval.5
@@ -1,6 +1,6 @@
.\" dhcp-eval.5
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
+.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
diff --git a/contrib/isc-dhcp/common/dhcp-options.5 b/contrib/isc-dhcp/common/dhcp-options.5
index 17349e81687c..5ee09eccf867 100644
--- a/contrib/isc-dhcp/common/dhcp-options.5
+++ b/contrib/isc-dhcp/common/dhcp-options.5
@@ -1,6 +1,6 @@
.\" dhcp-options.5
.\"
-.\" Copyright (c) 1996-2001 Internet Software Consortium.
+.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@@ -35,7 +35,7 @@
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
-.\" $Id: dhcp-options.5,v 1.19.2.8 2002/08/26 03:08:39 dhankins Exp $
+.\" $Id: dhcp-options.5,v 1.19.2.9 2002/11/17 02:26:57 dhankins Exp $
.\"
.TH dhcpd-options 5
.SH NAME
diff --git a/contrib/isc-dhcp/common/discover.c b/contrib/isc-dhcp/common/discover.c
index bb820a38e5b1..8dadde07b544 100644
--- a/contrib/isc-dhcp/common/discover.c
+++ b/contrib/isc-dhcp/common/discover.c
@@ -3,7 +3,7 @@
Network input dispatcher... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
+ * Copyright (c) 1995-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: discover.c,v 1.42.2.12 2002/11/03 04:31:55 dhankins Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: discover.c,v 1.42.2.13 2002/11/17 02:26:57 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/dispatch.c b/contrib/isc-dhcp/common/dispatch.c
index 7c8545be6468..bd87675391ff 100644
--- a/contrib/isc-dhcp/common/dispatch.c
+++ b/contrib/isc-dhcp/common/dispatch.c
@@ -3,7 +3,7 @@
Network input dispatcher... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
+ * Copyright (c) 1995-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: dispatch.c,v 1.63.2.2 2001/06/21 16:47:15 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dispatch.c,v 1.63.2.3 2002/11/17 02:26:57 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/dlpi.c b/contrib/isc-dhcp/common/dlpi.c
index 4cbc332ac2df..eea2f387a77c 100644
--- a/contrib/isc-dhcp/common/dlpi.c
+++ b/contrib/isc-dhcp/common/dlpi.c
@@ -3,7 +3,7 @@
Data Link Provider Interface (DLPI) network interface code. */
/*
- * 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
@@ -88,7 +88,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dlpi.c,v 1.28 2001/04/05 20:53:01 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dlpi.c,v 1.28.2.1 2002/11/17 02:26:57 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/dns.c b/contrib/isc-dhcp/common/dns.c
index 897d78dacdc6..5412f5558cd5 100644
--- a/contrib/isc-dhcp/common/dns.c
+++ b/contrib/isc-dhcp/common/dns.c
@@ -3,7 +3,7 @@
Domain Name Service subroutines. */
/*
- * Copyright (c) 2001 Internet Software Consortium.
+ * Copyright (c) 2001-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dns.c,v 1.35.2.12 2002/02/20 22:28:17 mellon Exp $ Copyright (c) 2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dns.c,v 1.35.2.13 2002/11/17 02:26:57 dhankins Exp $ Copyright (c) 2001-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/ethernet.c b/contrib/isc-dhcp/common/ethernet.c
index 309084a8766a..92269bc947b8 100644
--- a/contrib/isc-dhcp/common/ethernet.c
+++ b/contrib/isc-dhcp/common/ethernet.c
@@ -3,7 +3,7 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 1996-2000 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: ethernet.c,v 1.6.2.1 2001/06/14 19:15:27 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: ethernet.c,v 1.6.2.2 2002/11/17 02:26:57 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/execute.c b/contrib/isc-dhcp/common/execute.c
index ec4b22ee5a3a..805e578d3946 100644
--- a/contrib/isc-dhcp/common/execute.c
+++ b/contrib/isc-dhcp/common/execute.c
@@ -3,7 +3,7 @@
Support for executable statements. */
/*
- * Copyright (c) 1998-2001 Internet Software Consortium.
+ * Copyright (c) 1998-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: execute.c,v 1.44.2.8 2001/10/18 20:10:58 mellon Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: execute.c,v 1.44.2.9 2002/11/17 02:26:58 dhankins Exp $ Copyright (c) 1998-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/fddi.c b/contrib/isc-dhcp/common/fddi.c
index d73d4509f271..259b9344bda3 100644
--- a/contrib/isc-dhcp/common/fddi.c
+++ b/contrib/isc-dhcp/common/fddi.c
@@ -3,7 +3,7 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 1996-2000 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: fddi.c,v 1.3 2000/04/18 23:02:09 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: fddi.c,v 1.3.2.1 2002/11/17 02:26:58 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/icmp.c b/contrib/isc-dhcp/common/icmp.c
index e8f51961f41f..9130c0392f9a 100644
--- a/contrib/isc-dhcp/common/icmp.c
+++ b/contrib/isc-dhcp/common/icmp.c
@@ -4,7 +4,7 @@
responses. */
/*
- * 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
@@ -44,7 +44,7 @@
#ifndef lint
static char copyright[] =
-"$Id: icmp.c,v 1.30.2.4 2002/06/09 22:23:03 murray Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: icmp.c,v 1.30.2.5 2002/11/17 02:26:58 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/inet.c b/contrib/isc-dhcp/common/inet.c
index 158440e35e7e..f4468673c5c5 100644
--- a/contrib/isc-dhcp/common/inet.c
+++ b/contrib/isc-dhcp/common/inet.c
@@ -4,7 +4,7 @@
way... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
+ * Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -44,7 +44,7 @@
#ifndef lint
static char copyright[] =
-"$Id: inet.c,v 1.8.2.3 2001/06/21 16:59:00 mellon Exp $ Copyright (c) 1995-1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: inet.c,v 1.8.2.4 2002/11/17 02:26:58 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/lpf.c b/contrib/isc-dhcp/common/lpf.c
index da03c31115b1..0c4023d1b07a 100644
--- a/contrib/isc-dhcp/common/lpf.c
+++ b/contrib/isc-dhcp/common/lpf.c
@@ -4,7 +4,7 @@
Support Services in Vancouver, B.C. */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
+ * Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,7 @@
#ifndef lint
static char copyright[] =
-"$Id: lpf.c,v 1.29 2001/04/24 00:36:00 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: lpf.c,v 1.29.2.1 2002/11/17 02:26:58 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/memory.c b/contrib/isc-dhcp/common/memory.c
index 3c6d913dcb43..625839a6ff61 100644
--- a/contrib/isc-dhcp/common/memory.c
+++ b/contrib/isc-dhcp/common/memory.c
@@ -3,7 +3,7 @@
Memory-resident database... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
+ * Copyright (c) 1995-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: memory.c,v 1.66.2.3 2001/10/17 03:25:10 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: memory.c,v 1.66.2.4 2002/11/17 02:26:58 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/nit.c b/contrib/isc-dhcp/common/nit.c
index 59197f2a46f3..50833ccd872b 100644
--- a/contrib/isc-dhcp/common/nit.c
+++ b/contrib/isc-dhcp/common/nit.c
@@ -4,7 +4,7 @@
with one crucial tidbit of help from Stu Grossmen. */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
+ * Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -44,7 +44,7 @@
#ifndef lint
static char copyright[] =
-"$Id: nit.c,v 1.34 2001/02/17 21:17:25 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: nit.c,v 1.34.2.1 2002/11/17 02:26:58 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/options.c b/contrib/isc-dhcp/common/options.c
index 37e98eb5aced..6c4562c1c93b 100644
--- a/contrib/isc-dhcp/common/options.c
+++ b/contrib/isc-dhcp/common/options.c
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$Id: options.c,v 1.85.2.8 2002/02/19 20:36:52 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: options.c,v 1.85.2.9 2002/11/17 02:26:58 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
diff --git a/contrib/isc-dhcp/common/packet.c b/contrib/isc-dhcp/common/packet.c
index 8fe389412922..07d40bb5abb6 100644
--- a/contrib/isc-dhcp/common/packet.c
+++ b/contrib/isc-dhcp/common/packet.c
@@ -3,7 +3,7 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
- * 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
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: packet.c,v 1.40.2.1 2001/05/31 19:28:51 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: packet.c,v 1.40.2.2 2002/11/17 02:26:59 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/parse.c b/contrib/isc-dhcp/common/parse.c
index 15a661be30de..84b0691e8937 100644
--- a/contrib/isc-dhcp/common/parse.c
+++ b/contrib/isc-dhcp/common/parse.c
@@ -3,7 +3,7 @@
Common parser code for dhcpd and dhclient. */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
+ * Copyright (c) 1995-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: parse.c,v 1.104.2.10 2002/11/03 04:31:55 dhankins Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: parse.c,v 1.104.2.12 2002/11/17 02:58:34 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -3973,83 +3973,51 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
case AND:
next_op = expr_and;
context = expression_context (rhs);
- if (context != context_boolean) {
- needbool:
- parse_warn (cfile, "expecting boolean expressions");
- skip_to_semi (cfile);
- expression_dereference (&rhs, MDL);
- *lose = 1;
- return 0;
- }
break;
case OR:
next_op = expr_or;
context = expression_context (rhs);
- if (context != context_boolean)
- goto needbool;
break;
case PLUS:
next_op = expr_add;
context = expression_context (rhs);
- if (context != context_numeric) {
- neednum:
- parse_warn (cfile, "expecting numeric expressions");
- skip_to_semi (cfile);
- expression_dereference (&rhs, MDL);
- *lose = 1;
- return 0;
- }
break;
case MINUS:
next_op = expr_subtract;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case SLASH:
next_op = expr_divide;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case ASTERISK:
next_op = expr_multiply;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case PERCENT:
next_op = expr_remainder;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case AMPERSAND:
next_op = expr_binary_and;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case PIPE:
next_op = expr_binary_or;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case CARET:
next_op = expr_binary_xor;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
default:
@@ -4071,6 +4039,63 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
goto new_rhs;
}
+ if (binop != expr_none) {
+ if (expression_context (rhs) != expression_context (lhs)) {
+ parse_warn (cfile, "illegal expression relating different types");
+ skip_to_semi (cfile);
+ expression_dereference (&rhs, MDL);
+ expression_dereference (&lhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+
+ switch(binop) {
+ case expr_not_equal:
+ case expr_equal:
+ if ((expression_context(rhs) != context_data_or_numeric) &&
+ (expression_context(rhs) != context_data) &&
+ (expression_context(rhs) != context_numeric)) {
+ parse_warn (cfile, "expecting data/numeric expression");
+ skip_to_semi (cfile);
+ expression_dereference (&rhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+ break;
+
+ case expr_and:
+ case expr_or:
+ if (expression_context(rhs) != context_boolean) {
+ parse_warn (cfile, "expecting boolean expressions");
+ skip_to_semi (cfile);
+ expression_dereference (&rhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+ break;
+
+ case expr_add:
+ case expr_subtract:
+ case expr_divide:
+ case expr_multiply:
+ case expr_remainder:
+ case expr_binary_and:
+ case expr_binary_or:
+ case expr_binary_xor:
+ if (expression_context(rhs) != context_numeric) {
+ parse_warn (cfile, "expecting numeric expressions");
+ skip_to_semi (cfile);
+ expression_dereference (&rhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
/* Now, if we didn't find a binary operator, we're done parsing
this subexpression, so combine it with the preceding binary
operator and return the result. */
diff --git a/contrib/isc-dhcp/common/print.c b/contrib/isc-dhcp/common/print.c
index 49f10762c0d7..691f365d5cb2 100644
--- a/contrib/isc-dhcp/common/print.c
+++ b/contrib/isc-dhcp/common/print.c
@@ -3,7 +3,7 @@
Turn data structures into printable text. */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
+ * Copyright (c) 1995-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: print.c,v 1.53.2.6 2002/04/26 20:17:06 murray Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: print.c,v 1.53.2.7 2002/11/17 02:26:59 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/raw.c b/contrib/isc-dhcp/common/raw.c
index c56b6816dd31..9ba3cb574cf1 100644
--- a/contrib/isc-dhcp/common/raw.c
+++ b/contrib/isc-dhcp/common/raw.c
@@ -16,7 +16,7 @@
Sigh. */
/*
- * Copyright (c) 1995-2000 Internet Software Consortium.
+ * Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@
#ifndef lint
static char copyright[] =
-"$Id: raw.c,v 1.17 2000/03/17 03:59:01 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: raw.c,v 1.17.2.1 2002/11/17 02:26:59 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/resolv.c b/contrib/isc-dhcp/common/resolv.c
index 396f9ef747f3..7299cf1ee1d8 100644
--- a/contrib/isc-dhcp/common/resolv.c
+++ b/contrib/isc-dhcp/common/resolv.c
@@ -3,7 +3,7 @@
Parser for /etc/resolv.conf file. */
/*
- * 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: resolv.c,v 1.16 2001/05/02 06:39:43 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: resolv.c,v 1.16.2.1 2002/11/17 02:26:59 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/socket.c b/contrib/isc-dhcp/common/socket.c
index 6b105c642631..4742341c8d97 100644
--- a/contrib/isc-dhcp/common/socket.c
+++ b/contrib/isc-dhcp/common/socket.c
@@ -3,7 +3,7 @@
BSD socket interface code... */
/*
- * Copyright (c) 1995-2000 Internet Software Consortium.
+ * Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,7 @@
#ifndef lint
static char copyright[] =
-"$Id: socket.c,v 1.55.2.2 2002/06/09 22:21:20 murray Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: socket.c,v 1.55.2.3 2002/11/17 02:26:59 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/tables.c b/contrib/isc-dhcp/common/tables.c
index bfdf0c16c8eb..e94c91d8108b 100644
--- a/contrib/isc-dhcp/common/tables.c
+++ b/contrib/isc-dhcp/common/tables.c
@@ -3,7 +3,7 @@
Tables of information... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
+ * Copyright (c) 1995-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: tables.c,v 1.51.2.5 2002/02/09 03:23:54 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tables.c,v 1.51.2.6 2002/11/17 02:26:59 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/tr.c b/contrib/isc-dhcp/common/tr.c
index 3352d0a68536..bcd095c254a8 100644
--- a/contrib/isc-dhcp/common/tr.c
+++ b/contrib/isc-dhcp/common/tr.c
@@ -4,7 +4,7 @@
Contributed in May of 1999 by Andrew Chittenden */
/*
- * Copyright (c) 1996-2000 Internet Software Consortium.
+ * Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,7 @@
#ifndef lint
static char copyright[] =
-"$Id: tr.c,v 1.7 2001/04/27 22:23:02 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tr.c,v 1.7.2.1 2002/11/17 02:27:00 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/tree.c b/contrib/isc-dhcp/common/tree.c
index a9254cc91a36..046e10a511d1 100644
--- a/contrib/isc-dhcp/common/tree.c
+++ b/contrib/isc-dhcp/common/tree.c
@@ -3,7 +3,7 @@
Routines for manipulating parse trees... */
/*
- * Copyright (c) 1995-2001 Internet Software Consortium.
+ * Copyright (c) 1995-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: tree.c,v 1.101.2.6 2001/10/18 20:12:16 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tree.c,v 1.101.2.7 2002/11/17 02:27:00 dhankins Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
diff --git a/contrib/isc-dhcp/common/upf.c b/contrib/isc-dhcp/common/upf.c
index a737d57ab10c..0fa4f884b308 100644
--- a/contrib/isc-dhcp/common/upf.c
+++ b/contrib/isc-dhcp/common/upf.c
@@ -3,7 +3,7 @@
Ultrix PacketFilter interface code. */
/*
- * Copyright (c) 1996-2000 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: upf.c,v 1.21 2000/09/01 23:03:39 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: upf.c,v 1.21.2.1 2002/11/17 02:27:00 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"