- 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)
- DHCPv6 Client and Server protocol support. Use '-6' to run the daemons
#ifndef lint
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 */
#include "dhcpd.h"
indent_spaces (file, indent);
fprintf (file, "}");
break;
-
+
case case_statement:
indent_spaces (file, indent - 1);
fprintf (file, "case ");
token_print_indent (file, col, indent + 5,
"", "", ":");
break;
-
+
case default_statement:
indent_spaces (file, indent - 1);
fprintf (file, "default: ");
case execute_statement:
#ifdef ENABLE_EXECUTE
indent_spaces (file, indent);
- col = token_print_indent(file, col, indent + 4, "", "",
- "execute");
+ col = token_print_indent(file, indent + 4, indent + 4,
+ "", "", "execute");
col = token_print_indent(file, col, indent + 4, " ", "",
"(");
col = token_print_indent(file, col, indent + 4, "\"", "\"", r->data.execute.command);
#ifndef lint
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 */
#define DHCP_OPTION_DATA
len = universe->get_length(buffer + offset);
else if (universe->length_size == 0)
len = length - universe->tag_size;
- else
+ else {
log_fatal("Improperly configured option space(%s): "
"may not have a nonzero length size "
"AND a NULL get_length function.",
universe->name);
+ /* Silence compiler warnings. */
+ return 0;
+ }
+
offset += universe->length_size;
option_code_hash_lookup(&option, universe->code_hash, &code,
default:
log_fatal("Impossible case at %s:%d.",
MDL);
+ return "<double impossible condition>";
}
for (i = 0; ;i++) {
break;
enum_as_num:
- sprintf(op, "%u", tval);
+ sprintf(op, "%lu", tval);
break;
case 'I':
if (tval == -1)
sprintf (op, "%s", "infinite");
else
- sprintf (op, "%ld", tval);
+ sprintf(op, "%lu", tval);
break;
case 'L':
- sprintf (op, "%ld",
- (unsigned long)getULong (dp));
+ sprintf(op, "%lu",
+ (unsigned long)getULong(dp));
dp += 4;
break;
case 's':
dp += 2;
break;
case 'S':
- sprintf (op, "%d", (unsigned)getUShort (dp));
+ sprintf(op, "%u", (unsigned)getUShort(dp));
dp += 2;
break;
case 'b':
#ifndef lint
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 */
#include "dhcpd.h"
encapsulated = NULL;
if (!universe_hash_lookup(&encapsulated, universe_hash,
val, strlen(val), MDL)) {
- parse_warn(cfile, "unknown option space %s", s);
+ parse_warn(cfile, "unknown option space %s", val);
skip_to_semi (cfile);
return 0;
}
#ifndef lint
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";
#endif /* not lint */
#include "dhcpd.h"
+#include <sys/uio.h>
#ifdef USE_SOCKET_FALLBACK
# if !defined (USE_SOCKET_SEND)
int MRns_name_unpack(const unsigned char *, const unsigned char *,
const unsigned char *, unsigned 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)
#define res_update minires_update