mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 14:25:41 +00:00
Pulling in rt16318, a set of fixes for 3.1 from Hankins.
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: conflex.c,v 1.104 2006/08/02 22:36:00 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||
"$Id: conflex.c,v 1.105 2006/08/04 10:59:32 shane Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@@ -846,7 +846,7 @@ static enum dhcp_token intern (atom, dfv)
|
||||
return TOKEN_MAX;
|
||||
if (!strcasecmp (atom + 3, "-balance"))
|
||||
return MAX_BALANCE;
|
||||
if (!strcasecmp (atom + 3, "-lease-")) {
|
||||
if (!strncasecmp (atom + 3, "-lease-", 7)) {
|
||||
if (!strcasecmp(atom + 10, "misbalance"))
|
||||
return MAX_LEASE_MISBALANCE;
|
||||
if (!strcasecmp(atom + 10, "ownership"))
|
||||
@@ -1024,7 +1024,7 @@ static enum dhcp_token intern (atom, dfv)
|
||||
if (!strcasecmp(atom + 2, "arch"))
|
||||
return SEARCH;
|
||||
if (isascii(atom[2]) && tolower(atom[2]) == 'c') {
|
||||
if (!strcasecmp(atom + 3, "ond")) {
|
||||
if (!strncasecmp(atom + 3, "ond", 3)) {
|
||||
if (!strcasecmp(atom + 6, "ary"))
|
||||
return SECONDARY;
|
||||
if (!strcasecmp(atom + 6, "s"))
|
||||
|
@@ -34,7 +34,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: options.c,v 1.96 2006/08/02 22:36:00 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||
"$Id: options.c,v 1.97 2006/08/04 10:59:32 shane Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#define DHCP_OPTION_DATA
|
||||
@@ -2702,12 +2702,12 @@ pretty_escape(char **dst, char *dend, const unsigned char **src,
|
||||
/* If there aren't as many bytes left as there are in the source
|
||||
* buffer, don't even bother entering the loop.
|
||||
*/
|
||||
if (dst == NULL || src == NULL || (*dst >= dend) || (*src > send) ||
|
||||
*dst == NULL || *src == NULL ||
|
||||
if (dst == NULL || dend == NULL || src == NULL || send == NULL ||
|
||||
*dst == NULL || *src == NULL || (*dst >= dend) || (*src > send) ||
|
||||
((send - *src) > (dend - *dst)))
|
||||
return -1;
|
||||
|
||||
for ( ; *src < send ; *src++) {
|
||||
for ( ; *src < send ; (*src)++) {
|
||||
if (!isascii (**src) || !isprint (**src)) {
|
||||
/* Skip trailing NUL. */
|
||||
if ((*src + 1) != send || **src != '\0') {
|
||||
@@ -2716,7 +2716,7 @@ pretty_escape(char **dst, char *dend, const unsigned char **src,
|
||||
|
||||
sprintf(*dst, "\\%03o",
|
||||
**src);
|
||||
*dst += 4;
|
||||
(*dst) += 4;
|
||||
count += 4;
|
||||
}
|
||||
} else if (**src == '"' || **src == '\'' || **src == '$' ||
|
||||
@@ -2725,16 +2725,16 @@ pretty_escape(char **dst, char *dend, const unsigned char **src,
|
||||
return -1;
|
||||
|
||||
**dst = '\\';
|
||||
*dst++;
|
||||
(*dst)++;
|
||||
**dst = **src;
|
||||
*dst++;
|
||||
(*dst)++;
|
||||
count += 2;
|
||||
} else {
|
||||
if (*dst + 1 > dend)
|
||||
return -1;
|
||||
|
||||
**dst = **src;
|
||||
*dst++;
|
||||
(*dst)++;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@@ -2755,7 +2755,7 @@ pretty_text(char **dst, char *dend, const unsigned char **src,
|
||||
|
||||
if (emit_quotes) {
|
||||
**dst = '"';
|
||||
*dst++;
|
||||
(*dst)++;
|
||||
}
|
||||
|
||||
/* dend-1 leaves 1 byte for the closing quote. */
|
||||
@@ -2766,7 +2766,7 @@ pretty_text(char **dst, char *dend, const unsigned char **src,
|
||||
|
||||
if (emit_quotes && (*dst < dend)) {
|
||||
**dst = '"';
|
||||
*dst++;
|
||||
(*dst)++;
|
||||
|
||||
/* Includes quote prior to pretty_escape(); */
|
||||
count += 2;
|
||||
|
@@ -34,7 +34,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: parse.c,v 1.116 2006/07/31 22:19:51 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||
"$Id: parse.c,v 1.117 2006/08/04 10:59:33 shane Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@@ -4992,7 +4992,7 @@ int parse_option_decl (oc, cfile)
|
||||
u_int8_t hunkbuf [1024];
|
||||
unsigned hunkix = 0;
|
||||
const char *fmt, *f;
|
||||
struct option *option;
|
||||
struct option *option=NULL;
|
||||
struct iaddr ip_addr;
|
||||
u_int8_t *dp;
|
||||
unsigned len;
|
||||
|
Reference in New Issue
Block a user