mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-22 18:07:25 +00:00
- Corrected some situations where variables might be used without being
initialized. [ISC-Bugs #16865] - Silenced several other compiler warnings. [ISC-Bugs #16865] - Include the more standard sys/uio.h rather than rely upon other header files to include it (fixes a BSDI compile failure). [ISC-Bugs #16865]
This commit is contained in:
parent
98bd7ca099
commit
a512d11b6d
8
RELNOTES
8
RELNOTES
@ -54,6 +54,14 @@ the README file.
|
|||||||
|
|
||||||
- An obviated option code hash lookup to find D6O_CLIENTID was removed.
|
- An obviated option code hash lookup to find D6O_CLIENTID was removed.
|
||||||
|
|
||||||
|
- Corrected some situations where variables might be used without being
|
||||||
|
initialized.
|
||||||
|
|
||||||
|
- Silenced several other compiler warnings.
|
||||||
|
|
||||||
|
- Include the more standard sys/uio.h rather than rely upon other
|
||||||
|
header files to include it (fixes a BSDI compile failure).
|
||||||
|
|
||||||
Changes since 3.1.0 (NEW FEATURES)
|
Changes since 3.1.0 (NEW FEATURES)
|
||||||
|
|
||||||
- DHCPv6 Client and Server protocol support. Use '-6' to run the daemons
|
- DHCPv6 Client and Server protocol support. Use '-6' to run the daemons
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: execute.c,v 1.49 2007/01/28 23:00:19 each Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
"$Id: execute.c,v 1.50 2007/05/11 15:50:18 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@ -975,8 +975,8 @@ void write_statements (file, statements, indent)
|
|||||||
case execute_statement:
|
case execute_statement:
|
||||||
#ifdef ENABLE_EXECUTE
|
#ifdef ENABLE_EXECUTE
|
||||||
indent_spaces (file, indent);
|
indent_spaces (file, indent);
|
||||||
col = token_print_indent(file, col, indent + 4, "", "",
|
col = token_print_indent(file, indent + 4, indent + 4,
|
||||||
"execute");
|
"", "", "execute");
|
||||||
col = token_print_indent(file, col, indent + 4, " ", "",
|
col = token_print_indent(file, col, indent + 4, " ", "",
|
||||||
"(");
|
"(");
|
||||||
col = token_print_indent(file, col, indent + 4, "\"", "\"", r->data.execute.command);
|
col = token_print_indent(file, col, indent + 4, "\"", "\"", r->data.execute.command);
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: options.c,v 1.106 2007/05/08 23:05:20 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
"$Id: options.c,v 1.107 2007/05/11 15:50:18 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#define DHCP_OPTION_DATA
|
#define DHCP_OPTION_DATA
|
||||||
@ -177,12 +177,16 @@ int parse_option_buffer (options, buffer, length, universe)
|
|||||||
len = universe->get_length(buffer + offset);
|
len = universe->get_length(buffer + offset);
|
||||||
else if (universe->length_size == 0)
|
else if (universe->length_size == 0)
|
||||||
len = length - universe->tag_size;
|
len = length - universe->tag_size;
|
||||||
else
|
else {
|
||||||
log_fatal("Improperly configured option space(%s): "
|
log_fatal("Improperly configured option space(%s): "
|
||||||
"may not have a nonzero length size "
|
"may not have a nonzero length size "
|
||||||
"AND a NULL get_length function.",
|
"AND a NULL get_length function.",
|
||||||
universe->name);
|
universe->name);
|
||||||
|
|
||||||
|
/* Silence compiler warnings. */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
offset += universe->length_size;
|
offset += universe->length_size;
|
||||||
|
|
||||||
option_code_hash_lookup(&option, universe->code_hash, &code,
|
option_code_hash_lookup(&option, universe->code_hash, &code,
|
||||||
@ -1851,6 +1855,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
|||||||
default:
|
default:
|
||||||
log_fatal("Impossible case at %s:%d.",
|
log_fatal("Impossible case at %s:%d.",
|
||||||
MDL);
|
MDL);
|
||||||
|
return "<double impossible condition>";
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; ;i++) {
|
for (i = 0; ;i++) {
|
||||||
@ -1865,7 +1870,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
enum_as_num:
|
enum_as_num:
|
||||||
sprintf(op, "%u", tval);
|
sprintf(op, "%lu", tval);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'I':
|
case 'I':
|
||||||
@ -1889,11 +1894,11 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
|||||||
if (tval == -1)
|
if (tval == -1)
|
||||||
sprintf (op, "%s", "infinite");
|
sprintf (op, "%s", "infinite");
|
||||||
else
|
else
|
||||||
sprintf (op, "%ld", tval);
|
sprintf(op, "%lu", tval);
|
||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
sprintf (op, "%ld",
|
sprintf(op, "%lu",
|
||||||
(unsigned long)getULong (dp));
|
(unsigned long)getULong(dp));
|
||||||
dp += 4;
|
dp += 4;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
@ -1901,7 +1906,7 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
|
|||||||
dp += 2;
|
dp += 2;
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
sprintf (op, "%d", (unsigned)getUShort (dp));
|
sprintf(op, "%u", (unsigned)getUShort(dp));
|
||||||
dp += 2;
|
dp += 2;
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: parse.c,v 1.121 2007/05/08 23:05:20 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
"$Id: parse.c,v 1.122 2007/05/11 15:50:18 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@ -1562,7 +1562,7 @@ int parse_option_code_definition (cfile, option)
|
|||||||
encapsulated = NULL;
|
encapsulated = NULL;
|
||||||
if (!universe_hash_lookup(&encapsulated, universe_hash,
|
if (!universe_hash_lookup(&encapsulated, universe_hash,
|
||||||
val, strlen(val), MDL)) {
|
val, strlen(val), MDL)) {
|
||||||
parse_warn(cfile, "unknown option space %s", s);
|
parse_warn(cfile, "unknown option space %s", val);
|
||||||
skip_to_semi (cfile);
|
skip_to_semi (cfile);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -42,11 +42,12 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: socket.c,v 1.60 2007/05/08 23:05:20 dhankins Exp $ "
|
"$Id: socket.c,v 1.61 2007/05/11 15:50:18 dhankins Exp $ "
|
||||||
"Copyright (c) 2004-2006 Internet Systems Consortium.\n";
|
"Copyright (c) 2004-2006 Internet Systems Consortium.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
|
#include <sys/uio.h>
|
||||||
|
|
||||||
#ifdef USE_SOCKET_FALLBACK
|
#ifdef USE_SOCKET_FALLBACK
|
||||||
# if !defined (USE_SOCKET_SEND)
|
# if !defined (USE_SOCKET_SEND)
|
||||||
|
@ -50,6 +50,7 @@ int MRns_name_compress(const char *, u_char *, size_t, const unsigned char **,
|
|||||||
int MRns_name_unpack(const unsigned char *, const unsigned char *,
|
int MRns_name_unpack(const unsigned char *, const unsigned char *,
|
||||||
const unsigned char *, unsigned char *, size_t);
|
const unsigned char *, unsigned char *, size_t);
|
||||||
int MRns_name_ntop(const unsigned char *, char *, size_t);
|
int MRns_name_ntop(const unsigned char *, char *, size_t);
|
||||||
|
int MRns_name_pton(const char *, u_char *, size_t);
|
||||||
|
|
||||||
#if defined (MINIRES_LIB)
|
#if defined (MINIRES_LIB)
|
||||||
#define res_update minires_update
|
#define res_update minires_update
|
||||||
|
Loading…
x
Reference in New Issue
Block a user