summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2014-04-25 10:50:24 -0700
committerShawn Routhier <sar@isc.org>2014-04-25 10:50:24 -0700
commit38c4774a4324a16f0a9f39950700699949acb362 (patch)
treebb2da2f818d6eb7d362daaca512990bf3aa1a202
parent57187138e0098a281b689de6170325d4c9fe4c0b (diff)
downloadisc-dhcp-38c4774a4324a16f0a9f39950700699949acb362.tar.gz
[master] Several small patches
Tidy up several small tickets Correct parsing of DUID from config file, previously the LL type was put in the wrong place in the DUID string. [ISC-Bugs #20962] Add code to parse "do-forward-updates" as well as "do-forward-update" [ISC-Bugs #31328] Remove log_priority as it isn't currently used. [ISC-Bugs #33397] Increase the size of the buffer used for reading interface information. [ISC-Bugs #34858]
-rw-r--r--RELNOTES11
-rw-r--r--common/conflex.c3
-rw-r--r--common/discover.c9
-rw-r--r--common/parse.c6
-rw-r--r--includes/omapip/omapip_p.h1
-rw-r--r--omapip/errwarn.c9
-rw-r--r--server/confpars.c4
7 files changed, 29 insertions, 14 deletions
diff --git a/RELNOTES b/RELNOTES
index 2b20b5bd..913f7a54 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -54,6 +54,17 @@ by Eric Young (eay@cryptsoft.com).
Changes since 4.3.0
+- Tidy up several small tickets
+ Correct parsing of DUID from config file, previously the LL type
+ was put in the wrong place in the DUID string.
+ [ISC-Bugs #20962]
+ Add code to parse "do-forward-updates" as well as "do-forward-update"
+ Thanks to Jiri Popelka at Red Hat.
+ [ISC-Bugs #31328]
+ Remove log_priority as it isn't currently used.
+ [ISC-Bugs #33397]
+ Increase the size of the buffer used for reading interface information.
+ [ISC-Bugs #34858]
Changes since 4.3.0rc1
diff --git a/common/conflex.c b/common/conflex.c
index ff46b141..2e708dab 100644
--- a/common/conflex.c
+++ b/common/conflex.c
@@ -888,6 +888,9 @@ intern(char *atom, enum dhcp_token dfv) {
if (!strcasecmp(atom + 7, "list"))
return DOMAIN_LIST;
}
+ if (!strcasecmp (atom + 1, "o-forward-updates"))
+ return DO_FORWARD_UPDATE;
+ /* do-forward-update is included for historical reasons */
if (!strcasecmp (atom + 1, "o-forward-update"))
return DO_FORWARD_UPDATE;
if (!strcasecmp (atom + 1, "ebug"))
diff --git a/common/discover.c b/common/discover.c
index 4b40a70a..aeb2fc50 100644
--- a/common/discover.c
+++ b/common/discover.c
@@ -29,6 +29,9 @@
#include "dhcpd.h"
+/* length of line we can read from the IF file, 256 is too small in some cases */
+#define IF_LINE_LENGTH 1024
+
#define BSD_COMP /* needed on Solaris for SIOCGLIFNUM */
#include <sys/ioctl.h>
#include <errno.h>
@@ -408,7 +411,7 @@ struct iface_info {
*/
int
begin_iface_scan(struct iface_conf_list *ifaces) {
- char buf[256];
+ char buf[IF_LINE_LENGTH];
int len;
int i;
@@ -481,7 +484,7 @@ begin_iface_scan(struct iface_conf_list *ifaces) {
*/
static int
next_iface4(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
- char buf[256];
+ char buf[IF_LINE_LENGTH];
int len;
char *p;
char *name;
@@ -605,7 +608,7 @@ next_iface4(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
*/
static int
next_iface6(struct iface_info *info, int *err, struct iface_conf_list *ifaces) {
- char buf[256];
+ char buf[IF_LINE_LENGTH];
int len;
char *p;
char *name;
diff --git a/common/parse.c b/common/parse.c
index d86a1f95..38d350f4 100644
--- a/common/parse.c
+++ b/common/parse.c
@@ -5564,10 +5564,10 @@ int parse_warn (struct parse *cfile, const char *fmt, ...)
lexbuf [lix] = 0;
#ifndef DEBUG
- syslog (log_priority | LOG_ERR, "%s", mbuf);
- syslog (log_priority | LOG_ERR, "%s", cfile -> token_line);
+ syslog (LOG_ERR, "%s", mbuf);
+ syslog (LOG_ERR, "%s", cfile -> token_line);
if (cfile -> lexchar < 81)
- syslog (log_priority | LOG_ERR, "%s^", lexbuf);
+ syslog (LOG_ERR, "%s^", lexbuf);
#endif
if (log_perror) {
diff --git a/includes/omapip/omapip_p.h b/includes/omapip/omapip_p.h
index 30a778ed..788c91e6 100644
--- a/includes/omapip/omapip_p.h
+++ b/includes/omapip/omapip_p.h
@@ -278,7 +278,6 @@ OMAPI_ARRAY_TYPE_DECL(omapi_connection, omapi_connection_object_t);
isc_result_t omapi_handle_clear(omapi_handle_t);
-extern int log_priority;
extern int log_perror;
extern void (*log_cleanup) (void);
diff --git a/omapip/errwarn.c b/omapip/errwarn.c
index 4b3d353d..7c91d9d3 100644
--- a/omapip/errwarn.c
+++ b/omapip/errwarn.c
@@ -43,7 +43,6 @@ int log_perror = -1;
#else
int log_perror = 1;
#endif
-int log_priority;
void (*log_cleanup) (void);
#define CVT_BUF_MAX 1023
@@ -66,7 +65,7 @@ void log_fatal (const char * fmt, ... )
va_end (list);
#ifndef DEBUG
- syslog (log_priority | LOG_ERR, "%s", mbuf);
+ syslog (LOG_ERR, "%s", mbuf);
#endif
/* Also log it to stderr? */
@@ -105,7 +104,7 @@ int log_error (const char * fmt, ...)
va_end (list);
#ifndef DEBUG
- syslog (log_priority | LOG_ERR, "%s", mbuf);
+ syslog (LOG_ERR, "%s", mbuf);
#endif
if (log_perror) {
@@ -132,7 +131,7 @@ int log_info (const char *fmt, ...)
va_end (list);
#ifndef DEBUG
- syslog (log_priority | LOG_INFO, "%s", mbuf);
+ syslog (LOG_INFO, "%s", mbuf);
#endif
if (log_perror) {
@@ -159,7 +158,7 @@ int log_debug (const char *fmt, ...)
va_end (list);
#ifndef DEBUG
- syslog (log_priority | LOG_DEBUG, "%s", mbuf);
+ syslog (LOG_DEBUG, "%s", mbuf);
#endif
if (log_perror) {
diff --git a/server/confpars.c b/server/confpars.c
index 352b6a6c..a8fe1fb4 100644
--- a/server/confpars.c
+++ b/server/confpars.c
@@ -5951,7 +5951,7 @@ parse_server_duid_conf(struct parse *cfile) {
}
duid.data = (unsigned char *)duid.buffer->data;
putUShort(duid.buffer->data, DUID_LL);
- putULong(duid.buffer->data + 2, ll_type);
+ putUShort(duid.buffer->data + 2, ll_type);
memcpy(duid.buffer->data + 4,
ll_addr.data, ll_addr.len);
@@ -6015,7 +6015,7 @@ parse_server_duid_conf(struct parse *cfile) {
}
duid.data = (unsigned char *)duid.buffer->data;
putUShort(duid.buffer->data, DUID_LLT);
- putULong(duid.buffer->data + 2, ll_type);
+ putUShort(duid.buffer->data + 2, ll_type);
putULong(duid.buffer->data + 4, llt_time);
memcpy(duid.buffer->data + 8,
ll_addr.data, ll_addr.len);