diff options
author | murray <murray@FreeBSD.org> | 2002-09-30 08:39:27 +0000 |
---|---|---|
committer | murray <murray@FreeBSD.org> | 2002-09-30 08:39:27 +0000 |
commit | a0b500f866e54d9ce8def00d72daac852505461e (patch) | |
tree | 359b47391748afceb1567d1ce2a0fca3fb6dc676 /contrib/isc-dhcp/common | |
parent | a916d35e05e0f886097009e26d33c65a1ea5c370 (diff) | |
download | FreeBSD-src-a0b500f866e54d9ce8def00d72daac852505461e.zip FreeBSD-src-a0b500f866e54d9ce8def00d72daac852505461e.tar.gz |
Import ISC DHCP 3.0.1 RC9 client.
Diffstat (limited to 'contrib/isc-dhcp/common')
-rw-r--r-- | contrib/isc-dhcp/common/bpf.c | 4 | ||||
-rw-r--r-- | contrib/isc-dhcp/common/dhcp-eval.5 | 8 | ||||
-rw-r--r-- | contrib/isc-dhcp/common/dhcp-options.5 | 32 | ||||
-rw-r--r-- | contrib/isc-dhcp/common/discover.c | 9 | ||||
-rw-r--r-- | contrib/isc-dhcp/common/parse.c | 16 | ||||
-rw-r--r-- | contrib/isc-dhcp/common/print.c | 6 |
6 files changed, 50 insertions, 25 deletions
diff --git a/contrib/isc-dhcp/common/bpf.c b/contrib/isc-dhcp/common/bpf.c index 49af907..6ca91bb 100644 --- a/contrib/isc-dhcp/common/bpf.c +++ b/contrib/isc-dhcp/common/bpf.c @@ -47,7 +47,7 @@ #ifndef lint static char copyright[] = -"$Id: bpf.c,v 1.48 2001/04/08 21:12:49 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: bpf.c,v 1.48.2.1 2002/04/30 05:12:53 murray Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -421,7 +421,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom) if (interface -> rbuf_offset == interface -> rbuf_len) { length = read (interface -> rfdesc, interface -> rbuf, - interface -> rbuf_max); + (size_t)interface -> rbuf_max); if (length <= 0) { if (errno == EIO) { dhcp_interface_remove diff --git a/contrib/isc-dhcp/common/dhcp-eval.5 b/contrib/isc-dhcp/common/dhcp-eval.5 index cbb7745..e87c617 100644 --- a/contrib/isc-dhcp/common/dhcp-eval.5 +++ b/contrib/isc-dhcp/common/dhcp-eval.5 @@ -261,10 +261,10 @@ hexadecimal value can be specified with '\xnn', where nn is any positive hexadecimal number less than 0xff. .RE .PP -.I colon-seperated hexadecimal list +.I colon-separated hexadecimal list .PP .RS 0.25i -A list of hexadecimal octet values, seperated by colons, may be +A list of hexadecimal octet values, separated by colons, may be specified as a data expression. .RE .PP @@ -300,7 +300,7 @@ address. .RS 0.25i Converts the result of evaluating data-expr2 into a text string containing one number for each element of the result of evaluating -data-expr2. Each number is seperated from the other by the result of +data-expr2. Each number is separated from the other by the result of evaluating data-expr1. The result of evaluating numeric-expr1 specifies the base (2 through 16) into which the numbers should be converted. The result of evaluating numeric-expr2 specifies the @@ -421,7 +421,7 @@ Logging statements may be used to send information to the standard logging channels. A logging statement includes an optional priority (\fBfatal\fR, \fBerror\fR, \fBinfo\fR, or \fBdebug\fR), and a data expression. .PP -.B log (\fIpriority\fB, \fIdata-expr\FB)\fR +.B log (\fIpriority\fB, \fIdata-expr\fB)\fR .PP Logging statements take only a single data expression argument, so if you want to output multiple data values, you will need to use the \fBconcat\fR diff --git a/contrib/isc-dhcp/common/dhcp-options.5 b/contrib/isc-dhcp/common/dhcp-options.5 index dd00e86..33fd1e1 100644 --- a/contrib/isc-dhcp/common/dhcp-options.5 +++ b/contrib/isc-dhcp/common/dhcp-options.5 @@ -106,7 +106,7 @@ The .B string data type specifies either an NVT ASCII string enclosed in double quotes, or a series of octets specified in -hexadecimal, seperated by colons. For example: +hexadecimal, separated by colons. For example: .nf .sp 1 option dhcp-client-identifier "CLIENT-FOO"; @@ -804,7 +804,7 @@ agent should only use the list of scopes provided in this option; otherwise, it may use its own static configuration in preference to the list provided in this option. .PP -The text string should be a comma-seperated list of scopes that the +The text string should be a comma-separated list of scopes that the SLP agent should use. It may be omitted, in which case the SLP Agent will use the aggregated list of scopes of all directory agents known to the SLP agent. @@ -960,7 +960,7 @@ includes a URL that does not contain a port component, the normal default port is assumed (i.e., port 80 for http and port 443 for https). If the list includes a URL that does not contain a path component, the path /uap is assumed. If more than one URL is -specified in this list, the URLs are seperated by spaces. +specified in this list, the URLs are separated by spaces. .RE .PP .B option \fBuser-class\fR \fIstring\fR\fB;\fR @@ -1131,6 +1131,28 @@ fully-qualified domain name, or a single label. If there is no trailing generally update that name in some locally-defined domain. .RE .PP +.B option fqdn.hostname \fI--never set--\fB; +.RS 0.25i +.PP +This option should never be set, but it can be read back using the \fBoption\fR +and \fBconfig-option\fR operators in an expression, in which case it returns +the first label in the \fBfqdn.fqdn\fR suboption - for example, if +the value of \fBfqdn.fqdn\fR is "foo.example.com.", then \fBfqdn.hostname\fR +will be "foo". +.RE +.PP +.B option fqdn.domainname \fI--never set--\fB; +.RS 0.25i +.PP +This option should never be set, but it can be read back using the \fBoption\fR +and \fBconfig-option\fR operators in an expression, in which case it returns +all labels after the first label in the \fBfqdn.fqdn\fR suboption - for +example, if the value of \fBfqdn.fqdn\fR is "foo.example.com.", +then \fBfqdn.hostname\fR will be "example.com.". If this suboption value +is not set, it means that an unqualified name was sent in the fqdn option, +or that no fqdn option was sent at all. +.RE +.PP If you wish to use any of these suboptions, we strongly recommend that you refer to the Client FQDN option draft (or standard, when it becomes a standard) - the documentation here is sketchy and incomplete in comparison, @@ -1341,7 +1363,7 @@ option sql-default-connection-name "PRODZA"; .PP An option whose type is a data string is essentially just a collection of bytes, and can be specified either as quoted text, like the text -type, or as a list of hexadecimal contents seperated by colons whose +type, or as a list of hexadecimal contents separated by colons whose values must be between 0 and FF. For example: .nf @@ -1421,7 +1443,7 @@ length does not include itself or the option code). .PP The value of this option can be set in one of two ways. The first way is to simply specify the data directly, using a text string or a -colon-seperated list of hexadecimal values. For example: +colon-separated list of hexadecimal values. For example: .PP .nf option vendor-encapsulated-options diff --git a/contrib/isc-dhcp/common/discover.c b/contrib/isc-dhcp/common/discover.c index 953bab0..c52ecdb 100644 --- a/contrib/isc-dhcp/common/discover.c +++ b/contrib/isc-dhcp/common/discover.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: discover.c,v 1.42.2.8 2001/10/18 20:10:26 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; +"$Id: discover.c,v 1.42.2.9 2002/03/12 06:46:17 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -407,8 +407,11 @@ void discover_interfaces (state) name, isc_result_totext (status)); tmp -> flags = ir; strncpy (tmp -> name, name, IFNAMSIZ); - interface_reference (&tmp -> next, interfaces, MDL); - interface_dereference (&interfaces, MDL); + if (interfaces) { + interface_reference (&tmp -> next, + interfaces, MDL); + interface_dereference (&interfaces, MDL); + } interface_reference (&interfaces, tmp, MDL); interface_dereference (&tmp, MDL); tmp = interfaces; diff --git a/contrib/isc-dhcp/common/parse.c b/contrib/isc-dhcp/common/parse.c index a2d13f8..5f20dc7 100644 --- a/contrib/isc-dhcp/common/parse.c +++ b/contrib/isc-dhcp/common/parse.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: parse.c,v 1.104.2.8 2002/01/10 19:37:51 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; +"$Id: parse.c,v 1.104.2.9 2002/04/27 05:30:02 murray Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1804,7 +1804,7 @@ int parse_executable_statement (result, cfile, lose, case_context) executable_statement_dereference (result, MDL); return 0; } - if (parse_semi (cfile)) { + if (!parse_semi (cfile)) { *lose = 1; executable_statement_dereference (result, MDL); return 0; @@ -1964,8 +1964,8 @@ int parse_executable_statement (result, cfile, lose, case_context) log_fatal ("no memory for new zone."); zone -> name = parse_host_name (cfile); if (!zone -> name) { - badzone: parse_warn (cfile, "expecting hostname."); + badzone: *lose = 1; skip_to_semi (cfile); dns_zone_dereference (&zone, MDL); @@ -1974,8 +1974,10 @@ int parse_executable_statement (result, cfile, lose, case_context) i = strlen (zone -> name); if (zone -> name [i - 1] != '.') { s = dmalloc ((unsigned)i + 2, MDL); - if (!s) + if (!s) { + parse_warn (cfile, "no trailing '.' on zone"); goto badzone; + } strcpy (s, zone -> name); s [i] = '.'; s [i + 1] = 0; @@ -1986,10 +1988,8 @@ int parse_executable_statement (result, cfile, lose, case_context) goto badzone; status = enter_dns_zone (zone); if (status != ISC_R_SUCCESS) { - if (parse_semi (cfile)) - parse_warn (cfile, "dns zone key %s: %s", - zone -> name, - isc_result_totext (status)); + parse_warn (cfile, "dns zone key %s: %s", + zone -> name, isc_result_totext (status)); dns_zone_dereference (&zone, MDL); return 0; } diff --git a/contrib/isc-dhcp/common/print.c b/contrib/isc-dhcp/common/print.c index bd244c4..49f1076 100644 --- a/contrib/isc-dhcp/common/print.c +++ b/contrib/isc-dhcp/common/print.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: print.c,v 1.53.2.5 2002/02/09 03:23:19 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; +"$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"; #endif /* not lint */ #include "dhcpd.h" @@ -1366,8 +1366,8 @@ void print_dns_status (int status, ns_updque *uq) *s++ = '.'; *s++ = 0; if (errorp) - log_error (obuf); + log_error ("%s", obuf); else - log_info (obuf); + log_info ("%s", obuf); } #endif /* NSUPDATE */ |