summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.conf20
-rw-r--r--common/bpf.c4
-rw-r--r--common/dlpi.c4
-rw-r--r--common/execute.c6
-rw-r--r--common/lpf.c4
-rw-r--r--common/nit.c4
-rw-r--r--common/socket.c4
-rw-r--r--common/tree.c18
-rw-r--r--common/upf.c4
-rw-r--r--dhcpctl/Makefile.dist2
-rw-r--r--includes/isc/types.h15
-rw-r--r--omapip/Makefile.dist2
-rw-r--r--omapip/buffer.c8
-rw-r--r--omapip/connection.c2
-rw-r--r--omapip/message.c4
-rw-r--r--omapip/protocol.c24
-rw-r--r--server/omapi.c6
17 files changed, 80 insertions, 51 deletions
diff --git a/Makefile.conf b/Makefile.conf
index a90dff77..34193bed 100644
--- a/Makefile.conf
+++ b/Makefile.conf
@@ -125,7 +125,7 @@ MINORVERSION=MinorVersion
#FFMANDIR = /usr/share/man/cat4
#FFMANEXT = .4
#LIBMANDIR = /usr/share/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#VARRUN = /etc
#VARDB = /etc
#SCRIPT=solaris
@@ -144,7 +144,7 @@ MINORVERSION=MinorVersion
#FFMANDIR = /usr/share/man/cat4
#FFMANEXT = .4
#LIBMANDIR = /usr/share/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#VARRUN = /etc
#VARDB = /etc
#SCRIPT=solaris
@@ -211,7 +211,7 @@ MINORVERSION=MinorVersion
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
##--ultrix--
## Linux 1.x
@@ -223,7 +223,7 @@ MINORVERSION=MinorVersion
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/state/dhcp
@@ -239,7 +239,7 @@ MINORVERSION=MinorVersion
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/state/dhcp
@@ -255,7 +255,7 @@ MINORVERSION=MinorVersion
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/state/dhcp
@@ -271,7 +271,7 @@ MINORVERSION=MinorVersion
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#VARRUN = /var/run
#VARDB = /var/dhcpd
@@ -313,7 +313,7 @@ MINORVERSION=MinorVersion
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#VARRUN = /etc
#COPTS=-w3 -Dlint $(BINDDEF)
@@ -332,7 +332,7 @@ MINORVERSION=MinorVersion
#FFMANDIR = /usr/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#VARRUN = /etc
#MANINSTALL = /bin/true
#INSTALL = cp
@@ -359,7 +359,7 @@ MINORVERSION=MinorVersion
#FFMANDIR = /usr/local/man/man5
#FFMANEXT = .5
#LIBMANDIR = /usr/local/man/cat3
-#LIBMANEXT .3
+#LIBMANEXT = .3
#MANCAT = man
#INSTALL = install
#MANINSTALL = install
diff --git a/common/bpf.c b/common/bpf.c
index 290e12be..f18fce1b 100644
--- a/common/bpf.c
+++ b/common/bpf.c
@@ -22,7 +22,7 @@
#ifndef lint
static char copyright[] =
-"$Id: bpf.c,v 1.28 1999/09/08 01:43:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bpf.c,v 1.29 1999/09/09 23:53:13 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -426,7 +426,7 @@ void maybe_setup_fallback ()
if_register_fallback (fbi);
fbi -> refcnt = 1;
fbi -> type = dhcp_type_interface;
- status = omapi_register_io_object ((omapi_object_t)fbi,
+ status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
if (status != ISC_R_SUCCESS)
diff --git a/common/dlpi.c b/common/dlpi.c
index 981cd6e0..a79265d4 100644
--- a/common/dlpi.c
+++ b/common/dlpi.c
@@ -70,7 +70,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dlpi.c,v 1.13 1999/09/08 01:43:39 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dlpi.c,v 1.14 1999/09/09 23:53:13 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -1253,7 +1253,7 @@ void maybe_setup_fallback ()
if_register_fallback (fbi);
fbi -> refcnt = 1;
fbi -> type = dhcp_type_interface;
- status = omapi_register_io_object ((omapi_object_t)fbi,
+ status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
if (status != ISC_R_SUCCESS)
diff --git a/common/execute.c b/common/execute.c
index 2930102b..8ece9431 100644
--- a/common/execute.c
+++ b/common/execute.c
@@ -22,7 +22,7 @@
#ifndef lint
static char copyright[] =
-"$Id: execute.c,v 1.16 1999/07/31 17:56:09 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: execute.c,v 1.17 1999/09/09 23:53:14 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -45,13 +45,13 @@ int execute_statements (packet, lease, in_options, out_options, statements)
switch (r -> op) {
case statements_statement:
#if defined (DEBUG_EXPRESSIONS)
- log_info ("exec: statements");
+ log_debug ("exec: statements");
#endif
status = execute_statements (packet, lease,
in_options, out_options,
r -> data.statements);
#if defined (DEBUG_EXPRESSIONS)
- log_info ("exec: statements returns %d", status);
+ log_debug ("exec: statements returns %d", status);
#endif
if (!status)
return 0;
diff --git a/common/lpf.c b/common/lpf.c
index f20f9b2d..924d7cd1 100644
--- a/common/lpf.c
+++ b/common/lpf.c
@@ -23,7 +23,7 @@
#ifndef lint
static char copyright[] =
-"$Id: lpf.c,v 1.15 1999/09/08 01:43:39 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: lpf.c,v 1.16 1999/09/09 23:53:14 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -321,7 +321,7 @@ void maybe_setup_fallback ()
if_register_fallback (fbi);
fbi -> refcnt = 1;
fbi -> type = dhcp_type_interface;
- status = omapi_register_io_object ((omapi_object_t)fbi,
+ status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
if (status != ISC_R_SUCCESS)
diff --git a/common/nit.c b/common/nit.c
index ef4a2ce7..533cbd12 100644
--- a/common/nit.c
+++ b/common/nit.c
@@ -23,7 +23,7 @@
#ifndef lint
static char copyright[] =
-"$Id: nit.c,v 1.23 1999/09/08 01:43:39 mellon Exp $ Copyright (c) 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: nit.c,v 1.24 1999/09/09 23:53:14 mellon Exp $ Copyright (c) 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -357,7 +357,7 @@ void maybe_setup_fallback ()
if_register_fallback (fbi);
fbi -> refcnt = 1;
fbi -> type = dhcp_type_interface;
- status = omapi_register_io_object ((omapi_object_t)fbi,
+ status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
if (status != ISC_R_SUCCESS)
diff --git a/common/socket.c b/common/socket.c
index 9e30160f..1f312ad2 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -30,7 +30,7 @@
#ifndef lint
static char copyright[] =
-"$Id: socket.c,v 1.38 1999/09/08 01:43:52 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: socket.c,v 1.39 1999/09/09 23:53:14 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -228,7 +228,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* This just reads in a packet and silently discards it. */
isc_result_t fallback_discard (object)
- omapi_object_t object;
+ omapi_object_t *object;
{
char buf [1540];
struct sockaddr_in from;
diff --git a/common/tree.c b/common/tree.c
index 9006019a..cf78d9d7 100644
--- a/common/tree.c
+++ b/common/tree.c
@@ -22,7 +22,7 @@
#ifndef lint
static char copyright[] =
-"$Id: tree.c,v 1.46 1999/08/01 14:26:48 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tree.c,v 1.47 1999/09/09 23:53:14 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -551,9 +551,6 @@ int evaluate_boolean_expression (result, packet, lease, in_options,
/* we only want to do this on a DHCPREQUEST */
if (!packet || packet -> packet_type != DHCPREQUEST)
return 0;
- /* no update for static leases */
- if (lease && (lease -> flags & STATIC_LEASE))
- return 0;
memset (&rrtype, 0, sizeof expr1);
s0 = evaluate_data_expression (&rrtype, packet, lease,
in_options, cfg_options,
@@ -574,11 +571,18 @@ int evaluate_boolean_expression (result, packet, lease, in_options,
if (s0 && s1 && s2 && s3) {
if (rrtype.len == 1 &&
strncmp(rrtype.data, "a", 1) == 0) {
-log_info("calling updateA(%s, %s, %d, lease)", expr1.data , expr2.data, ttl);
+#if defined (DEBUG_EXPRESSIONS)
+ log_debug("calling updateA(%s, %s, %d, lease)",
+ expr1.data , expr2.data, ttl);
+#endif
updateA(expr1, expr2, ttl, lease);
} else if (rrtype.len == 3 &&
strncmp(rrtype.data, "ptr", 3) == 0) {
-log_info("calling updatePTR(%s, %s, %d, lease)", expr1.data , expr2.data, ttl);
+#if defined (DEBUG_EXPRESSIONS)
+ log_debug ("%s updatePTR(%s, %s, %d, lease)",
+ "calling", expr1.data,
+ expr2.data, ttl);
+#endif
updatePTR(expr1, expr2, ttl, lease);
}
*result = 1;
@@ -588,7 +592,7 @@ log_info("calling updatePTR(%s, %s, %d, lease)", expr1.data , expr2.data, ttl);
return 0;
}
#if defined (DEBUG_EXPRESSIONS)
- log_info ("dns-update(%s, %s, %s):",
+ log_debug ("dns-update (%s, %s, %s):",
print_hex_1(rrtype.len, rrtype.data, 60),
print_hex_2(expr1.len, expr1.data, 60),
print_hex_3(expr2.len, expr2.data, 60));
diff --git a/common/upf.c b/common/upf.c
index 6eb48df6..3b60702f 100644
--- a/common/upf.c
+++ b/common/upf.c
@@ -22,7 +22,7 @@
#ifndef lint
static char copyright[] =
-"$Id: upf.c,v 1.12 1999/09/08 01:43:39 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: upf.c,v 1.13 1999/09/09 23:53:15 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -307,7 +307,7 @@ void maybe_setup_fallback ()
if_register_fallback (fbi);
fbi -> refcnt = 1;
fbi -> type = dhcp_type_interface;
- status = omapi_register_io_object ((omapi_object_t)fbi,
+ status = omapi_register_io_object ((omapi_object_t *)fbi,
if_readsocket, 0,
fallback_discard, 0, 0);
if (status != ISC_R_SUCCESS)
diff --git a/dhcpctl/Makefile.dist b/dhcpctl/Makefile.dist
index 13ada812..10940ecc 100644
--- a/dhcpctl/Makefile.dist
+++ b/dhcpctl/Makefile.dist
@@ -30,7 +30,7 @@ CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
all: libdhcpctl.a test $(CATMANPAGES)
test: test.o libdhcpctl.a ../omapip/libomapi.a
- $(CC) $(DEBUG) -o test test.o libdhcpctl.a ../omapip/libomapi.a
+ $(CC) $(DEBUG) -o test test.o libdhcpctl.a ../omapip/libomapi.a $(LIBS)
libdhcpctl.a: $(OBJ)
rm -f libdhcpctl.a
diff --git a/includes/isc/types.h b/includes/isc/types.h
index 3938c9dc..2a3e7e32 100644
--- a/includes/isc/types.h
+++ b/includes/isc/types.h
@@ -22,6 +22,21 @@
#include <isc/boolean.h>
#include <isc/list.h>
+/* This is a bit of an ugly: if you are using NSUPDATE, you are also
+ * including (by means of -I...) the include files that are installed
+ * by BIND. The problem is that the BIND includes also have an
+ * isc/list.h, which gets included above rather than the isc/list.h
+ * that is packaged with the DHCP server. That include does not
+ * prepend the macros with "ISC_", the one ith the DHCP's isc/list.h
+ * does. Sigh.
+ *
+ * Fixed in BIND 9. Double sigh. This is a temporary fix - we'll
+ * come up with something more correct later.
+ */
+#ifdef NSUPDATE
+#define ISC_LIST LIST
+#endif
+
/***
*** Core Types.
***/
diff --git a/omapip/Makefile.dist b/omapip/Makefile.dist
index 86af6019..e429be64 100644
--- a/omapip/Makefile.dist
+++ b/omapip/Makefile.dist
@@ -32,7 +32,7 @@ CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
all: libomapi.a test $(CATMANPAGES)
test: test.o libomapi.a
- $(CC) $(DEBUG) -o test test.o libomapi.a
+ $(CC) $(DEBUG) -o test test.o libomapi.a $(LIBS)
libomapi.a: $(OBJ)
rm -f libomapi.a
diff --git a/omapip/buffer.c b/omapip/buffer.c
index f0c6f287..477a2ce1 100644
--- a/omapip/buffer.c
+++ b/omapip/buffer.c
@@ -171,9 +171,9 @@ isc_result_t omapi_connection_copyin (omapi_object_t *h,
/* Copy some bytes from the input buffer, and advance the input buffer
pointer beyond the bytes copied out. */
-u_int32_t omapi_connection_copyout (unsigned char *buf,
- omapi_object_t *h,
- int size)
+isc_result_t omapi_connection_copyout (unsigned char *buf,
+ omapi_object_t *h,
+ int size)
{
int bytes_remaining;
int bytes_this_copy;
@@ -244,7 +244,7 @@ u_int32_t omapi_connection_copyout (unsigned char *buf,
return ISC_R_SUCCESS;
}
-u_int32_t omapi_connection_writer (omapi_object_t *h)
+isc_result_t omapi_connection_writer (omapi_object_t *h)
{
int bytes_this_write;
int bytes_written;
diff --git a/omapip/connection.c b/omapip/connection.c
index 0f7dd30e..d0890bbe 100644
--- a/omapip/connection.c
+++ b/omapip/connection.c
@@ -74,8 +74,10 @@ isc_result_t omapi_connect (omapi_object_t *c,
} else
he = (struct hostent *)0;
+#if defined (HAVE_SA_LEN)
obj -> remote_addr.sin_len =
sizeof (struct sockaddr_in);
+#endif
obj -> remote_addr.sin_family = AF_INET;
memset (&(obj -> remote_addr.sin_zero), 0,
sizeof obj -> remote_addr.sin_zero);
diff --git a/omapip/message.c b/omapip/message.c
index 94489b67..a9695ac2 100644
--- a/omapip/message.c
+++ b/omapip/message.c
@@ -364,7 +364,7 @@ isc_result_t omapi_message_process (omapi_object_t *mo, omapi_object_t *po)
omapi_message_object_t *message, *m;
omapi_object_t *object = (omapi_object_t *)0;
omapi_value_t *tv = (omapi_value_t *)0;
- int create, update, exclusive;
+ u_int32_t create, update, exclusive;
isc_result_t status, waitstatus;
omapi_object_type_t *type;
@@ -623,7 +623,7 @@ isc_result_t omapi_message_process (omapi_object_t *mo, omapi_object_t *po)
(omapi_object_t *)0,
"result", &tv);
if (status == ISC_R_SUCCESS) {
- status = omapi_get_int_value (&waitstatus,
+ status = omapi_get_int_value ((u_int32_t *)&waitstatus,
tv -> value);
omapi_value_dereference (&tv,
"omapi_message_process");
diff --git a/omapip/protocol.c b/omapip/protocol.c
index 38d77411..a8b8dad7 100644
--- a/omapip/protocol.c
+++ b/omapip/protocol.c
@@ -257,8 +257,10 @@ isc_result_t omapi_protocol_signal_handler (omapi_object_t *h,
case omapi_protocol_intro_wait:
/* Get protocol version and header size in network
byte order. */
- omapi_connection_get_uint32 (c, &p -> protocol_version);
- omapi_connection_get_uint32 (c, &p -> header_size);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> protocol_version);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> header_size);
/* We currently only support the current protocol version. */
if (p -> protocol_version != OMAPI_PROTOCOL_VERSION) {
@@ -294,14 +296,20 @@ isc_result_t omapi_protocol_signal_handler (omapi_object_t *h,
}
/* Swap in the header... */
- omapi_connection_get_uint32 (c, &p -> message -> authid);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> authid);
/* XXX bind the authenticator here! */
- omapi_connection_get_uint32 (c, &p -> message -> authlen);
- omapi_connection_get_uint32 (c, &p -> message -> op);
- omapi_connection_get_uint32 (c, &p -> message -> handle);
- omapi_connection_get_uint32 (c, &p -> message -> id);
- omapi_connection_get_uint32 (c, &p -> message -> rid);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> authlen);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> op);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> handle);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> id);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> rid);
/* If there was any extra header data, skip over it. */
if (p -> header_size > sizeof (omapi_protocol_header_t)) {
diff --git a/server/omapi.c b/server/omapi.c
index d1f56054..8b5a941c 100644
--- a/server/omapi.c
+++ b/server/omapi.c
@@ -29,7 +29,7 @@
#ifndef lint
static char copyright[] =
-"$Id: omapi.c,v 1.3 1999/09/09 23:33:43 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: omapi.c,v 1.4 1999/09/09 23:53:29 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -830,8 +830,8 @@ isc_result_t dhcp_host_signal_handler (omapi_object_t *h,
if (!strcmp (name, "updated")) {
if (!host -> name) {
char hnbuf [64];
- sprintf (hnbuf, "nh%08lx%08x",
- cur_time, (u_int32_t)host);
+ sprintf (hnbuf, "nh%08lx%08lx",
+ cur_time, (unsigned long)host);
host -> name = malloc (strlen (hnbuf) + 1);
if (!host -> name)
return ISC_R_NOMEMORY;