CVS commit: src/external/bsd/dhcp/dist

2017-06-27 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Jun 28 02:46:31 UTC 2017

Modified Files:
src/external/bsd/dhcp/dist/client: dhclient.c
src/external/bsd/dhcp/dist/common: bpf.c comapi.c discover.c dispatch.c
dlpi.c execute.c lpf.c nit.c options.c packet.c parse.c raw.c
socket.c tr.c tree.c upf.c
src/external/bsd/dhcp/dist/dhcpctl: cltest.c omshell.c
src/external/bsd/dhcp/dist/includes: dhcpd.h
src/external/bsd/dhcp/dist/relay: dhcrelay.c
src/external/bsd/dhcp/dist/server: dhcpd.c
src/external/bsd/dhcp/dist/tests: t_api.c

Log Message:
Make DHCP programs compatible with crunchgen(1)

DHCP programs are incompatible with crunchgen(1) so far, because
libdhcp uses callbacks with the same function names for dhclient,
dhcrelay, dhcpd, and omshell. As a result, it is impossible to
link correctly in a single binary.

The offending symbols are classify, check_collection, dhcp, dhcpv6,
bootp, find_class, parse_allow_deny, and dhcp_set_control_state, and
the local_port and remote_port variables.

This change make each program register an array of callbacks at
main() start. libdhcp then uses callbacks through registered
function and variable pointers, and DHCP programs can now go
trough crunchgen(1).

Submitted upstream as ISC-Bugs #45330 with a patch against latest ISC git.
The soon to be released 4.3.6 will not include the change, but it is
likely to be included in 4.3.7


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcp/dist/client/dhclient.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/dist/common/bpf.c \
src/external/bsd/dhcp/dist/common/dispatch.c
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/dhcp/dist/common/comapi.c \
src/external/bsd/dhcp/dist/common/nit.c \
src/external/bsd/dhcp/dist/common/tr.c \
src/external/bsd/dhcp/dist/common/upf.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/dhcp/dist/common/discover.c
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/dhcp/dist/common/dlpi.c \
src/external/bsd/dhcp/dist/common/execute.c \
src/external/bsd/dhcp/dist/common/options.c \
src/external/bsd/dhcp/dist/common/parse.c \
src/external/bsd/dhcp/dist/common/socket.c \
src/external/bsd/dhcp/dist/common/tree.c
cvs rdiff -u -r1.1.1.5 -r1.2 src/external/bsd/dhcp/dist/common/lpf.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcp/dist/common/packet.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/dhcp/dist/common/raw.c
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/dhcp/dist/dhcpctl/cltest.c \
src/external/bsd/dhcp/dist/dhcpctl/omshell.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/dhcp/dist/includes/dhcpd.h
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/dhcp/dist/relay/dhcrelay.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/dhcp/dist/server/dhcpd.c
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/dhcp/dist/tests/t_api.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/client/dhclient.c
diff -u src/external/bsd/dhcp/dist/client/dhclient.c:1.10 src/external/bsd/dhcp/dist/client/dhclient.c:1.11
--- src/external/bsd/dhcp/dist/client/dhclient.c:1.10	Sun Jan 10 20:10:44 2016
+++ src/external/bsd/dhcp/dist/client/dhclient.c	Wed Jun 28 02:46:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhclient.c,v 1.10 2016/01/10 20:10:44 christos Exp $	*/
+/*	$NetBSD: dhclient.c,v 1.11 2017/06/28 02:46:30 manu Exp $	*/
 /* dhclient.c
 
DHCP Client. */
@@ -32,7 +32,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: dhclient.c,v 1.10 2016/01/10 20:10:44 christos Exp $");
+__RCSID("$NetBSD: dhclient.c,v 1.11 2017/06/28 02:46:30 manu Exp $");
 
 #include "dhcpd.h"
 #include 
@@ -95,6 +95,21 @@ int wanted_ia_ta = 0;
 int wanted_ia_pd = 0;
 char *mockup_relay = NULL;
 
+libdhcp_callbacks_t dhclient_callbacks = {
+	_port,
+	_port,
+	classify,
+	check_collection,
+	dhcp,
+#ifdef DHCPv6
+	dhcpv6,
+#endif /* DHCPv6 */
+	bootp,
+	find_class,
+	parse_allow_deny,
+	dhcp_set_control_state,
+};
+
 void run_stateless(int exit_mode);
 
 static void usage(void);
@@ -183,6 +198,8 @@ main(int argc, char **argv) {
 	char *s;
 	char **ifaces;
 
+	libdhcp_callbacks_register(_callbacks);
+
 	/* Initialize client globals. */
 	memset(_duid, 0, sizeof(default_duid));
 
@@ -942,7 +959,7 @@ int find_subnet (struct subnet **sp,
  */
 
 #include 
-__RCSID("$NetBSD: dhclient.c,v 1.10 2016/01/10 20:10:44 christos Exp $");
+__RCSID("$NetBSD: dhclient.c,v 1.11 2017/06/28 02:46:30 manu Exp $");
 
 void state_reboot (cpp)
 	void *cpp;

Index: src/external/bsd/dhcp/dist/common/bpf.c
diff -u src/external/bsd/dhcp/dist/common/bpf.c:1.4 src/external/bsd/dhcp/dist/common/bpf.c:1.5
--- src/external/bsd/dhcp/dist/common/bpf.c:1.4	Sun Jan 10 20:10:44 2016
+++ src/external/bsd/dhcp/dist/common/bpf.c	Wed Jun 28 02:46:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.4 2016/01/10 20:10:44 christos Exp $	*/
+/*	$NetBSD: bpf.c,v 1.5 2017/06/28 02:46:30 

CVS commit: src/external/bsd/dhcp/dist/relay

2017-06-05 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jun  5 07:35:23 UTC 2017

Modified Files:
src/external/bsd/dhcp/dist/relay: dhcrelay.c

Log Message:
Fix buggy dhcrelay(8) requirement to stay in foreground

This version of dhcrelay(8) needed to stay inforeground with -d flag in
order to service requests. Running inbackground turned it deaf to DHCP
requests.

This was caused by wrong kqueue(2) usage, where kevent(2) was used with
a file descriptor obtained by a kqueue(2) call done before fork(2).
kqueue(2) man page says "The queue is not inherited by a child created
with fork(2)". As a result, kevent(2) calls always got EBADF.

The fix is to reorder function calls in dhcrelay(8) main() function.
dhcp_context_create(), which causes kqueue(2) to be invoked, is
moved with its dependencies after fork(2). This matches the code layout
of dhclient(8) and dhcpd(8), which do not have the bug.

The fix was not submitted upstream since latest ISC DHCP code was
refactored and does not have the bug anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcp/dist/relay/dhcrelay.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/relay/dhcrelay.c
diff -u src/external/bsd/dhcp/dist/relay/dhcrelay.c:1.6 src/external/bsd/dhcp/dist/relay/dhcrelay.c:1.7
--- src/external/bsd/dhcp/dist/relay/dhcrelay.c:1.6	Sun Jan 10 20:10:45 2016
+++ src/external/bsd/dhcp/dist/relay/dhcrelay.c	Mon Jun  5 07:35:23 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhcrelay.c,v 1.6 2016/01/10 20:10:45 christos Exp $	*/
+/*	$NetBSD: dhcrelay.c,v 1.7 2017/06/05 07:35:23 manu Exp $	*/
 /* dhcrelay.c
 
DHCP/BOOTP Relay Agent. */
@@ -28,7 +28,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: dhcrelay.c,v 1.6 2016/01/10 20:10:45 christos Exp $");
+__RCSID("$NetBSD: dhcrelay.c,v 1.7 2017/06/05 07:35:23 manu Exp $");
 
 #include "dhcpd.h"
 #include 
@@ -207,13 +207,6 @@ main(int argc, char **argv) {
 	setlogmask(LOG_UPTO(LOG_INFO));
 #endif	
 
-	/* Set up the isc and dns library managers */
-	status = dhcp_context_create(DHCP_CONTEXT_PRE_DB | DHCP_CONTEXT_POST_DB,
- NULL, NULL);
-	if (status != ISC_R_SUCCESS)
-		log_fatal("Can't initialize context: %s",
-			  isc_result_totext(status));
-
 	/* Set up the OMAPI. */
 	status = omapi_init();
 	if (status != ISC_R_SUCCESS)
@@ -536,17 +529,6 @@ main(int argc, char **argv) {
 	}
 #endif
 
-	/* Get the current time... */
-	gettimeofday(_tv, NULL);
-
-	/* Discover all the network interfaces. */
-	discover_interfaces(DISCOVER_RELAY);
-
-#ifdef DHCPv6
-	if (local_family == AF_INET6)
-		setup_streams();
-#endif
-
 	/* Become a daemon... */
 	if (!no_daemon) {
 		int pid;
@@ -587,6 +569,24 @@ main(int argc, char **argv) {
 		IGNORE_RET (chdir("/"));
 	}
 
+	/* Set up the isc and dns library managers */
+	status = dhcp_context_create(DHCP_CONTEXT_PRE_DB | DHCP_CONTEXT_POST_DB,
+ NULL, NULL);
+	if (status != ISC_R_SUCCESS)
+		log_fatal("Can't initialize context: %s",
+			  isc_result_totext(status));
+
+	/* Get the current time... */
+	gettimeofday(_tv, NULL);
+
+	/* Discover all the network interfaces. */
+	discover_interfaces(DISCOVER_RELAY);
+
+#ifdef DHCPv6
+	if (local_family == AF_INET6)
+		setup_streams();
+#endif
+
 	/* Set up the packet handler... */
 	if (local_family == AF_INET)
 		bootp_packet_handler = do_relay4;
@@ -948,7 +948,7 @@ find_interface_by_agent_option(struct dh
  */
 
 #include 
-__RCSID("$NetBSD: dhcrelay.c,v 1.6 2016/01/10 20:10:45 christos Exp $");
+__RCSID("$NetBSD: dhcrelay.c,v 1.7 2017/06/05 07:35:23 manu Exp $");
 static int
 add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet,
 			unsigned length, struct in_addr giaddr) {



CVS commit: src/external/bsd/dhcp

2017-01-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 28 23:59:15 UTC 2017

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
add sqlite3


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.16 src/external/bsd/dhcp/Makefile.inc:1.17
--- src/external/bsd/dhcp/Makefile.inc:1.16	Sun Jan 10 15:10:44 2016
+++ src/external/bsd/dhcp/Makefile.inc	Sat Jan 28 18:59:15 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.16 2016/01/10 20:10:44 christos Exp $
+# $NetBSD: Makefile.inc,v 1.17 2017/01/28 23:59:15 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -38,9 +38,9 @@ LDADD+=-lpthread
 .if (${MKCRYPTO} != "no")
 .if (${MKKERBEROS} != "no")
 LDADD+= -lgssapi -lkrb5 -lhx509 -lheimntlm -lheimbase \
-	-lcom_err  -lroken -lasn1 -lwind
+	-lcom_err  -lroken -lasn1 -lwind -lsqlite3
 DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBHEIMBASE} \
-	${LIBCOM_ERR} ${LIBROKEN} ${LIBASN1} ${LIBWIND}
+	${LIBCOM_ERR} ${LIBROKEN} ${LIBASN1} ${LIBWIND} ${LIBSQLITE3}
 .endif
 .if defined(PROG) && ${PROG} == "dhclient"
 LDADD+=-Wl,-Bdynamic



CVS commit: src/external/bsd/dhcp/bin/clientscript

2016-11-27 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Sun Nov 27 19:04:41 UTC 2016

Modified Files:
src/external/bsd/dhcp/bin/clientscript: dhclient-script

Log Message:
Do not attempt to pass -llinfo to route.

llinfo was removed, and the command fails because of it.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/dhcp/bin/clientscript/dhclient-script

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/bin/clientscript/dhclient-script
diff -u src/external/bsd/dhcp/bin/clientscript/dhclient-script:1.2 src/external/bsd/dhcp/bin/clientscript/dhclient-script:1.3
--- src/external/bsd/dhcp/bin/clientscript/dhclient-script:1.2	Thu Feb 26 09:59:55 2015
+++ src/external/bsd/dhcp/bin/clientscript/dhclient-script	Sun Nov 27 19:04:40 2016
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: dhclient-script,v 1.2 2015/02/26 09:59:55 roy Exp $
+# $NetBSD: dhclient-script,v 1.3 2016/11/27 19:04:40 maya Exp $
 
 ENTERHOOKS=/etc/dhclient-enter-hooks
 EXITHOOKS=/etc/dhclient-exit-hooks
@@ -85,7 +85,7 @@ delete_old_routes() {
 		shift; shift
 	done
 
-	route -n flush -inet -llinfo -host
+	route -n flush -inet -host
 }
 
 # Invoke the local dhcp client enter hooks, if they exist.



CVS commit: src/external/bsd/dhcp/bin/server

2016-06-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  8 01:41:43 UTC 2016

Modified Files:
src/external/bsd/dhcp/bin/server: Makefile

Log Message:
stack protector


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/dhcp/bin/server/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/bin/server/Makefile
diff -u src/external/bsd/dhcp/bin/server/Makefile:1.1 src/external/bsd/dhcp/bin/server/Makefile:1.2
--- src/external/bsd/dhcp/bin/server/Makefile:1.1	Sun Mar 24 11:54:30 2013
+++ src/external/bsd/dhcp/bin/server/Makefile	Tue Jun  7 21:41:43 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2013/03/24 15:54:30 christos Exp $
+# $NetBSD: Makefile,v 1.2 2016/06/08 01:41:43 christos Exp $
 
 .include 
 
@@ -15,4 +15,6 @@ FILESDIR= /usr/share/examples/dhcp
 FILES=	dhcpd.conf
 .endif
 
+COPTS.omapi.c +=	-Wno-stack-protector
+
 .include 



CVS commit: src/external/bsd/dhcp/dist/bind

2016-01-25 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Mon Jan 25 22:15:15 UTC 2016

Removed Files:
src/external/bsd/dhcp/dist/bind: bind.tar.gz

Log Message:
Get rid of a file which shouldn't be there.

ok christos@


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/external/bsd/dhcp/dist/bind/bind.tar.gz

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/dhcp/dist/common

2016-01-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan  8 23:09:41 UTC 2016

Modified Files:
src/external/bsd/dhcp/dist/common: packet.c

Log Message:
Check correctly the packet length (CVE-2015-8605)
XXX: pullup-6, pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/dhcp/dist/common/packet.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/common/packet.c
diff -u src/external/bsd/dhcp/dist/common/packet.c:1.1.1.4 src/external/bsd/dhcp/dist/common/packet.c:1.2
--- src/external/bsd/dhcp/dist/common/packet.c:1.1.1.4	Sat Jul 12 07:57:46 2014
+++ src/external/bsd/dhcp/dist/common/packet.c	Fri Jan  8 18:09:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: packet.c,v 1.1.1.4 2014/07/12 11:57:46 spz Exp $	*/
+/*	$NetBSD: packet.c,v 1.2 2016/01/08 23:09:41 christos Exp $	*/
 /* packet.c
 
Packet assembly code, originally contributed by Archie Cobbs. */
@@ -34,7 +34,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: packet.c,v 1.1.1.4 2014/07/12 11:57:46 spz Exp $");
+__RCSID("$NetBSD: packet.c,v 1.2 2016/01/08 23:09:41 christos Exp $");
 
 #include "dhcpd.h"
 
@@ -224,7 +224,28 @@ ssize_t decode_hw_header (interface, buf
 	}
 }
 
-/* UDP header and IP header decoded together for convenience. */
+/*!
+ *
+ * \brief UDP header and IP header decoded together for convenience.
+ *
+ * Attempt to decode the UDP and IP headers and, if necessary, checksum
+ * the packet.
+ *
+ * \param inteface - the interface on which the packet was recevied
+ * \param buf - a pointer to the buffer for the received packet
+ * \param bufix - where to start processing the buffer, previous
+ *routines may have processed parts of the buffer already
+ * \param from - space to return the address of the packet sender
+ * \param buflen - remaining length of the buffer, this will have been
+ * decremented by bufix by the caller
+ * \param rbuflen - space to return the length of the payload from the udp
+ *  header
+ * \param csum_ready - indication if the checksum is valid for use
+ * non-zero indicates the checksum should be validated
+ *
+ * \return - the index to the first byte of the udp payload (that is the
+ *   start of the DHCP packet
+ */
 
 ssize_t
 decode_udp_ip_header(struct interface_info *interface,
@@ -235,7 +256,7 @@ decode_udp_ip_header(struct interface_in
   unsigned char *data;
   struct ip ip;
   struct udphdr udp;
-  unsigned char *upp, *endbuf;
+  unsigned char *upp;
   u_int32_t ip_len, ulen, pkt_len;
   u_int32_t sum, usum;
   static int ip_packets_seen;
@@ -246,11 +267,8 @@ decode_udp_ip_header(struct interface_in
   static int udp_packets_length_overflow;
   unsigned len;
 
-  /* Designate the end of the input buffer for bounds checks. */
-  endbuf = buf + bufix + buflen;
-
   /* Assure there is at least an IP header there. */
-  if ((buf + bufix + sizeof(ip)) > endbuf)
+  if (sizeof(ip) > buflen)
 	  return -1;
 
   /* Copy the IP header into a stack aligned structure for inspection.
@@ -262,13 +280,17 @@ decode_udp_ip_header(struct interface_in
   ip_len = (*upp & 0x0f) << 2;
   upp += ip_len;
 
-  /* Check the IP packet length. */
+  /* Check packet lengths are within the buffer:
+   * first the ip header (ip_len)
+   * then the packet length from the ip header (pkt_len)
+   * then the udp header (ip_len + sizeof(udp)
+   * We are liberal in what we accept, the udp payload should fit within
+   * pkt_len, but we only check against the full buffer size.
+   */
   pkt_len = ntohs(ip.ip_len);
-  if (pkt_len > buflen)
-	return -1;
-
-  /* Assure after ip_len bytes that there is enough room for a UDP header. */
-  if ((upp + sizeof(udp)) > endbuf)
+  if ((ip_len > buflen) ||
+  (pkt_len > buflen) ||
+  ((ip_len + sizeof(udp)) > buflen))
 	  return -1;
 
   /* Copy the UDP header into a stack aligned structure for inspection. */
@@ -289,7 +311,8 @@ decode_udp_ip_header(struct interface_in
 	return -1;
 
   udp_packets_length_checked++;
-  if ((upp + ulen) > endbuf) {
+  /* verify that the payload length from the udp packet fits in the buffer */
+  if ((ip_len + ulen) > buflen) {
 	udp_packets_length_overflow++;
 	if ((udp_packets_length_checked > 4) &&
 	((udp_packets_length_checked /
@@ -303,9 +326,6 @@ decode_udp_ip_header(struct interface_in
 	return -1;
   }
 
-  if ((ulen < sizeof(udp)) || ((upp + ulen) > endbuf))
-	return -1;
-
   /* Check the IP header checksum - it should be zero. */
   ++ip_packets_seen;
   if (wrapsum (checksum (buf + bufix, ip_len, 0))) {



CVS commit: src/external/bsd/dhcp/dist/includes

2015-10-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 14 15:58:46 UTC 2015

Modified Files:
src/external/bsd/dhcp/dist/includes: dhcpd.h
src/external/bsd/dhcp/dist/includes/omapip: omapip_p.h

Log Message:
use __sysloglike where appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcp/dist/includes/dhcpd.h
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/includes/dhcpd.h
diff -u src/external/bsd/dhcp/dist/includes/dhcpd.h:1.6 src/external/bsd/dhcp/dist/includes/dhcpd.h:1.7
--- src/external/bsd/dhcp/dist/includes/dhcpd.h:1.6	Sat Jul 12 08:09:37 2014
+++ src/external/bsd/dhcp/dist/includes/dhcpd.h	Wed Oct 14 11:58:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhcpd.h,v 1.6 2014/07/12 12:09:37 spz Exp $	*/
+/*	$NetBSD: dhcpd.h,v 1.7 2015/10/14 15:58:46 christos Exp $	*/
 /* dhcpd.h
 
Definitions for dhcpd... */
@@ -2092,8 +2092,7 @@ int parse_option_token (struct expressio
 			const char **, struct expression *, int, int);
 int parse_allow_deny (struct option_cache **, struct parse *, int);
 int parse_auth_key (struct data_string *, struct parse *);
-int parse_warn (struct parse *, const char *, ...)
-	__attribute__((__format__(__printf__,2,3)));
+int parse_warn (struct parse *, const char *, ...) __sysloglike(2, 3);
 struct expression *parse_domain_list(struct parse *cfile, int);
 
 

Index: src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h
diff -u src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h:1.1.1.4 src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h:1.2
--- src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h:1.1.1.4	Sat Jul 12 07:57:57 2014
+++ src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h	Wed Oct 14 11:58:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: omapip_p.h,v 1.1.1.4 2014/07/12 11:57:57 spz Exp $	*/
+/*	$NetBSD: omapip_p.h,v 1.2 2015/10/14 15:58:46 christos Exp $	*/
 /* omapip_p.h
 
Private master include file for the OMAPI library. */
@@ -283,14 +283,10 @@ extern int log_priority;
 extern int log_perror;
 extern void (*log_cleanup) (void);
 
-void log_fatal (const char *, ...)
-	__attribute__((__format__(__printf__,1,2))) ISC_DHCP_NORETURN;
-int log_error (const char *, ...)
-	__attribute__((__format__(__printf__,1,2)));
-int log_info (const char *, ...)
-	__attribute__((__format__(__printf__,1,2)));
-int log_debug (const char *, ...)
-	__attribute__((__format__(__printf__,1,2)));
+void log_fatal (const char *, ...) __sysloglike(1, 2) ISC_DHCP_NORETURN;
+int log_error (const char *, ...) __sysloglike(1, 2);
+int log_info (const char *, ...) __sysloglike(1, 2);
+int log_debug (const char *, ...) __sysloglike(1, 2);
 void do_percentm (char *obuf, const char *ibuf);
 
 isc_result_t uerr2isc (int);



CVS commit: src/external/bsd/dhcp

2015-09-27 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Sep 27 21:01:27 UTC 2015

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
revert previous. Dynamic libraries break systems with split / and /usr
partitions and also sun2. libdns is pulling in Kerberos anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/dhcp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.14 src/external/bsd/dhcp/Makefile.inc:1.15
--- src/external/bsd/dhcp/Makefile.inc:1.14	Sat Sep 26 09:48:27 2015
+++ src/external/bsd/dhcp/Makefile.inc	Sun Sep 27 21:01:27 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.14 2015/09/26 09:48:27 mlelstv Exp $
+# $NetBSD: Makefile.inc,v 1.15 2015/09/27 21:01:27 mlelstv Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -31,12 +31,27 @@ CPPFLAGS+= -I${BIND}/lib/${dir}/pthreads
 CPPFLAGS+= -DLOCALSTATEDIR='"/var"'
 LDADD+= ${COBJDIR}/libdhcp.a
 LDADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
-.if (${MKCRYPTO} != "no")
-LDADD+= -lcrypto -lcrypt
-DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
+.if defined(PROG) && ${PROG} == "dhclient"
+LDADD+=-Wl,-Bstatic
 .endif
-LDADD+=-lirs -lisccfg -ldns -lisc
+LDADD+= -lirs -lisccfg -ldns -lisc
 LDADD+=-lpthread
+.if (${MKCRYPTO} != "no")
+.if (${MKKERBEROS} != "no")
+LDADD+= -lgssapi -lkrb5 -lhx509 -lheimntlm -lheimbase \
+	-lcom_err  -lroken -lasn1 -lwind
+DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBHEIMBASE} \
+	${LIBCOM_ERR} ${LIBROKEN} ${LIBASN1} ${LIBWIND}
+.endif
+.if defined(PROG) && ${PROG} == "dhclient"
+LDADD+=-Wl,-Bdynamic
+.endif
+LDADD+= -lcrypto -lipsec -lcrypt
+DPADD+= ${LIBCRYPTO} ${LIBIPSEC} ${LIBCRYPT}
+.endif
+.if defined(PROG) && ${PROG} == "dhclient"
+LDADD+=-Wl,-Bdynamic
+.endif
 DPADD+= ${COBJDIR}/libdhcp.a
 DPADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
 DPADD+=	${LIBDNS} ${LIBISC}



CVS commit: src/external/bsd/dhcp

2015-09-26 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Sep 26 09:48:27 UTC 2015

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
Don't link partially with static libraries.
Don't link with kerberos librararies, nothing is using them.
Don't link with libipsec, our local patch, that requires it, is gone.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.13 src/external/bsd/dhcp/Makefile.inc:1.14
--- src/external/bsd/dhcp/Makefile.inc:1.13	Fri Jan 23 03:00:44 2015
+++ src/external/bsd/dhcp/Makefile.inc	Sat Sep 26 09:48:27 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.13 2015/01/23 03:00:44 christos Exp $
+# $NetBSD: Makefile.inc,v 1.14 2015/09/26 09:48:27 mlelstv Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -31,27 +31,12 @@ CPPFLAGS+= -I${BIND}/lib/${dir}/pthreads
 CPPFLAGS+= -DLOCALSTATEDIR='"/var"'
 LDADD+= ${COBJDIR}/libdhcp.a
 LDADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
-.if defined(PROG) && ${PROG} == "dhclient"
-LDADD+=-Wl,-Bstatic
-.endif
-LDADD+= -lirs -lisccfg -ldns -lisc
-LDADD+=-lpthread
 .if (${MKCRYPTO} != "no")
-.if (${MKKERBEROS} != "no")
-LDADD+= -lgssapi -lkrb5 -lhx509 -lheimntlm -lheimbase \
-	-lcom_err  -lroken -lasn1 -lwind
-DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBHEIMBASE} \
-	${LIBCOM_ERR} ${LIBROKEN} ${LIBASN1} ${LIBWIND}
-.endif
-.if defined(PROG) && ${PROG} == "dhclient"
-LDADD+=-Wl,-Bdynamic
-.endif
-LDADD+= -lcrypto -lipsec -lcrypt
-DPADD+= ${LIBCRYPTO} ${LIBIPSEC} ${LIBCRYPT}
-.endif
-.if defined(PROG) && ${PROG} == "dhclient"
-LDADD+=-Wl,-Bdynamic
+LDADD+= -lcrypto -lcrypt
+DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
 .endif
+LDADD+=-lirs -lisccfg -ldns -lisc
+LDADD+=-lpthread
 DPADD+= ${COBJDIR}/libdhcp.a
 DPADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
 DPADD+=	${LIBDNS} ${LIBISC}



CVS commit: src/external/bsd/dhcp/bin/clientscript

2015-02-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Feb 26 09:59:55 UTC 2015

Modified Files:
src/external/bsd/dhcp/bin/clientscript: dhclient-script

Log Message:
No longer a need to add local routes for the address.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/dhcp/bin/clientscript/dhclient-script

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/bin/clientscript/dhclient-script
diff -u src/external/bsd/dhcp/bin/clientscript/dhclient-script:1.1 src/external/bsd/dhcp/bin/clientscript/dhclient-script:1.2
--- src/external/bsd/dhcp/bin/clientscript/dhclient-script:1.1	Sun Mar 24 15:54:30 2013
+++ src/external/bsd/dhcp/bin/clientscript/dhclient-script	Thu Feb 26 09:59:55 2015
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: dhclient-script,v 1.1 2013/03/24 15:54:30 christos Exp $
+# $NetBSD: dhclient-script,v 1.2 2015/02/26 09:59:55 roy Exp $
 
 ENTERHOOKS=/etc/dhclient-enter-hooks
 EXITHOOKS=/etc/dhclient-exit-hooks
@@ -147,7 +147,6 @@ PREINIT)
 	if [ ! -z $alias_ip_address ]; then
 		ifconfig $interface inet \
 		-alias $alias_ip_address /dev/null 21
-		route delete $alias_ip_address 127.0.0.1  /dev/null 21
 	fi
 
 	ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
@@ -182,14 +181,11 @@ BOUND|RENEW|REBIND|REBOOT)
 	\( x$alias_ip_address != x$old_ip_address \) ]; then
 		ifconfig $interface inet \
 		-alias $alias_ip_address  /dev/null 21
-		route delete $alias_ip_address 127.0.0.1  /dev/null 21
 	fi
 
 	if [ \( ! -z $old_ip_address \) -a \
 	\( x$old_ip_address != x$new_ip_address \) ]; then
 		eval ifconfig $interface inet -alias $old_ip_address $medium
-		route delete $old_ip_address 127.0.0.1 /dev/null 21
-
 		delete_old_routes
 	fi
 
@@ -198,8 +194,6 @@ BOUND|RENEW|REBIND|REBOOT)
 	\( x$reason = xBOUND \) -o \( x$reason = xREBOOT \) ]; then
 		eval ifconfig $interface inet $new_ip_address \
 		$new_netmask_arg $new_broadcast_arg $medium
-		route add $new_ip_address 127.0.0.1 /dev/null 21
-
 		add_new_routes
 	fi
 
@@ -207,7 +201,6 @@ BOUND|RENEW|REBIND|REBOOT)
 	\( x$new_ip_address != x$alias_ip_address \) ]; then
 		ifconfig $interface inet alias $alias_ip_address \
 		$alias_subnet_arg
-		route add $alias_ip_address 127.0.0.1
 	fi
 	make_resolv_conf
 	exit_with_hooks 0
@@ -223,12 +216,10 @@ EXPIRE|FAIL|RELEASE|STOP)
 
 	if [ ! -z $alias_ip_address ]; then
 		ifconfig $interface inet -alias $alias_ip_address 
-		route delete $alias_ip_address 127.0.0.1
 	fi  /dev/null 21
 
 	if [ ! -z $old_ip_address ]; then
 		eval ifconfig $interface inet -alias $old_ip_address $medium
-		route delete $old_ip_address 127.0.0.1 /dev/null 21
 		delete_old_routes
 
 	fi
@@ -236,7 +227,6 @@ EXPIRE|FAIL|RELEASE|STOP)
 	if [ ! -z $alias_ip_address ]; then
 		ifconfig $interface inet alias $alias_ip_address \
 		$alias_subnet_arg
-		route add $alias_ip_address 127.0.0.1
 	fi
 
 	restore_resolv_conf
@@ -246,7 +236,6 @@ EXPIRE|FAIL|RELEASE|STOP)
 TIMEOUT)
 	if [ ! -z $alias_ip_address ]; then
 		ifconfig $interface inet -alias $alias_ip_address
-		route delete $alias_ip_address 127.0.0.1
 	fi  /dev/null 21
 
 	if [ ! -z $new_host_name ]; then
@@ -273,11 +262,8 @@ TIMEOUT)
 			then
 ifconfig $interface inet alias \
 $alias_ip_address $alias_subnet_arg
-route add $alias_ip_address 127.0.0.1
 			fi
 
-			route add $new_ip_address 127.0.0.1 /dev/null 21
-
 			add_new_routes
 			make_resolv_conf
 			exit_with_hooks 0



CVS commit: src/external/bsd/dhcp

2015-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 23 03:00:44 UTC 2015

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
turn back to dynamic to reduce size.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/dhcp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.12 src/external/bsd/dhcp/Makefile.inc:1.13
--- src/external/bsd/dhcp/Makefile.inc:1.12	Fri Sep 26 18:18:48 2014
+++ src/external/bsd/dhcp/Makefile.inc	Thu Jan 22 22:00:44 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.12 2014/09/26 22:18:48 christos Exp $
+# $NetBSD: Makefile.inc,v 1.13 2015/01/23 03:00:44 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -49,6 +49,9 @@ LDADD+=-Wl,-Bdynamic
 LDADD+= -lcrypto -lipsec -lcrypt
 DPADD+= ${LIBCRYPTO} ${LIBIPSEC} ${LIBCRYPT}
 .endif
+.if defined(PROG)  ${PROG} == dhclient
+LDADD+=-Wl,-Bdynamic
+.endif
 DPADD+= ${COBJDIR}/libdhcp.a
 DPADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
 DPADD+=	${LIBDNS} ${LIBISC}



CVS commit: src/external/bsd/dhcp/dist/includes/omapip

2014-12-09 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Dec 10 07:43:34 UTC 2014

Modified Files:
src/external/bsd/dhcp/dist/includes/omapip: result.h

Log Message:
Don't define ISC_R_* symbols, that conflict with the newest bind.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/dhcp/dist/includes/omapip/result.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/includes/omapip/result.h
diff -u src/external/bsd/dhcp/dist/includes/omapip/result.h:1.1.1.2 src/external/bsd/dhcp/dist/includes/omapip/result.h:1.2
--- src/external/bsd/dhcp/dist/includes/omapip/result.h:1.1.1.2	Sat Jul 12 11:57:57 2014
+++ src/external/bsd/dhcp/dist/includes/omapip/result.h	Wed Dec 10 07:43:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: result.h,v 1.1.1.2 2014/07/12 11:57:57 spz Exp $	*/
+/*	$NetBSD: result.h,v 1.2 2014/12/10 07:43:34 uebayasi Exp $	*/
 /* result.h
  */
 
@@ -81,6 +81,7 @@
 
 // Included for historical reasons, these should be removed as
 // soon as reasonable
+#if 0
 #define ISC_R_HOSTUNKNOWN	DHCP_R_HOSTUNKNOWN
 #define ISC_R_VERSIONMISMATCH	DHCP_R_VERSIONMISMATCH
 #define ISC_R_PROTOCOLERROR	DHCP_R_PROTOCOLERROR	
@@ -114,6 +115,7 @@
 #define ISC_R_NOT_EQUAL		DHCP_R_NOT_EQUAL		
 #define ISC_R_CONNRESET		DHCP_R_CONNRESET		
 #define ISC_R_UNKNOWNATTRIBUTE	DHCP_R_UNKNOWNATTRIBUTE	
+#endif
 
 isc_result_t
 dhcp_result_register(void);



CVS commit: src/external/bsd/dhcp

2014-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 26 22:18:48 UTC 2014

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
The crypto-enabled dhclient command needs more libraries burned in so that
it does not depend on /usr/lib
XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.11 src/external/bsd/dhcp/Makefile.inc:1.12
--- src/external/bsd/dhcp/Makefile.inc:1.11	Sat Jul 12 08:11:22 2014
+++ src/external/bsd/dhcp/Makefile.inc	Fri Sep 26 18:18:48 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.11 2014/07/12 12:11:22 spz Exp $
+# $NetBSD: Makefile.inc,v 1.12 2014/09/26 22:18:48 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -36,9 +36,6 @@ LDADD+=-Wl,-Bstatic
 .endif
 LDADD+= -lirs -lisccfg -ldns -lisc
 LDADD+=-lpthread
-.if defined(PROG)  ${PROG} == dhclient
-LDADD+=-Wl,-Bdynamic
-.endif
 .if (${MKCRYPTO} != no)
 .if (${MKKERBEROS} != no)
 LDADD+= -lgssapi -lkrb5 -lhx509 -lheimntlm -lheimbase \
@@ -46,6 +43,9 @@ LDADD+= -lgssapi -lkrb5 -lhx509 -lheimnt
 DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBHEIMBASE} \
 	${LIBCOM_ERR} ${LIBROKEN} ${LIBASN1} ${LIBWIND}
 .endif
+.if defined(PROG)  ${PROG} == dhclient
+LDADD+=-Wl,-Bdynamic
+.endif
 LDADD+= -lcrypto -lipsec -lcrypt
 DPADD+= ${LIBCRYPTO} ${LIBIPSEC} ${LIBCRYPT}
 .endif



CVS commit: src/external/bsd/dhcp

2014-07-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jul 13 14:56:56 UTC 2014

Modified Files:
src/external/bsd/dhcp/dist/includes: config.h.in
src/external/bsd/dhcp/include: config.h

Log Message:
remove WORDS_BIGENDIAN, nothing uses it.
Pick up DHCPv6 from Makefile, so we only enable it for USE_INET6 like
before.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 src/external/bsd/dhcp/dist/includes/config.h.in
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/dhcp/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/includes/config.h.in
diff -u src/external/bsd/dhcp/dist/includes/config.h.in:1.1.1.3 src/external/bsd/dhcp/dist/includes/config.h.in:1.2
--- src/external/bsd/dhcp/dist/includes/config.h.in:1.1.1.3	Sat Jul 12 07:57:52 2014
+++ src/external/bsd/dhcp/dist/includes/config.h.in	Sun Jul 13 10:56:56 2014
@@ -179,18 +179,6 @@
 /* Version number of package */
 #undef VERSION
 
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-#  undef WORDS_BIGENDIAN
-# endif
-#endif
-
 /* Define to 1 if on MINIX. */
 #undef _MINIX
 

Index: src/external/bsd/dhcp/include/config.h
diff -u src/external/bsd/dhcp/include/config.h:1.5 src/external/bsd/dhcp/include/config.h:1.6
--- src/external/bsd/dhcp/include/config.h:1.5	Sat Jul 12 16:03:19 2014
+++ src/external/bsd/dhcp/include/config.h	Sun Jul 13 10:56:56 2014
@@ -15,8 +15,11 @@
 #include sys/endian.h
 #define DHCP_BYTE_ORDER _BYTE_ORDER
 
+#if 0
+/* From the Makefile */
 /* Define to 1 to include DHCPv6 support. */
 #define DHCPv6 1
+#endif
 
 /* Define to any value to chroot() prior to loading config. */
 /* #undef EARLY_CHROOT */
@@ -181,18 +184,6 @@
 /* Version number of package */
 #define VERSION 4.3.0
 
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* #  undef WORDS_BIGENDIAN */
-# endif
-#endif
-
 /* Define to 1 if on MINIX. */
 /* #undef _MINIX */
 



CVS commit: src/external/bsd/dhcp/include

2014-07-13 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sun Jul 13 19:37:23 UTC 2014

Modified Files:
src/external/bsd/dhcp/include: config.h

Log Message:
make the comment at the DHCPv6 define less cryptic


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcp/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/include/config.h
diff -u src/external/bsd/dhcp/include/config.h:1.6 src/external/bsd/dhcp/include/config.h:1.7
--- src/external/bsd/dhcp/include/config.h:1.6	Sun Jul 13 14:56:56 2014
+++ src/external/bsd/dhcp/include/config.h	Sun Jul 13 19:37:23 2014
@@ -16,7 +16,7 @@
 #define DHCP_BYTE_ORDER _BYTE_ORDER
 
 #if 0
-/* From the Makefile */
+/* make it possible to obey USE_INET6=no, define it in the Makefile instead */
 /* Define to 1 to include DHCPv6 support. */
 #define DHCPv6 1
 #endif



CVS commit: src/external/bsd/dhcp

2014-07-12 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sat Jul 12 12:11:22 UTC 2014

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
the new release wants libisc (and thus libisccfg) from bind


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.10 src/external/bsd/dhcp/Makefile.inc:1.11
--- src/external/bsd/dhcp/Makefile.inc:1.10	Thu Jan 16 13:55:46 2014
+++ src/external/bsd/dhcp/Makefile.inc	Sat Jul 12 12:11:22 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.10 2014/01/16 13:55:46 christos Exp $
+# $NetBSD: Makefile.inc,v 1.11 2014/07/12 12:11:22 spz Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -23,7 +23,7 @@ CPPFLAGS+=	-DDHCPv6
 CPPFLAGS+= -DISC_PLATFORM_USETHREADS -DHAVE_CONFIG_H
 CPPFLAGS+= -I${DIST} -I${DIST}/includes -I${DIST}/../include
 CPPFLAGS+= -I${BIND} -I${BIND}/includes -I${BIND}/../include
-.for dir in isc dns
+.for dir in isc dns irs
 CPPFLAGS+= -I${BIND}/lib/${dir}/include
 CPPFLAGS+= -I${BIND}/lib/${dir}/unix/include
 CPPFLAGS+= -I${BIND}/lib/${dir}/pthreads/include
@@ -34,7 +34,7 @@ LDADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJD
 .if defined(PROG)  ${PROG} == dhclient
 LDADD+=-Wl,-Bstatic
 .endif
-LDADD+= -ldns -lisc
+LDADD+= -lirs -lisccfg -ldns -lisc
 LDADD+=-lpthread
 .if defined(PROG)  ${PROG} == dhclient
 LDADD+=-Wl,-Bdynamic



CVS commit: src/external/bsd/dhcp/include

2014-07-12 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Sat Jul 12 20:03:19 UTC 2014

Modified Files:
src/external/bsd/dhcp/include: config.h

Log Message:
update config.h to the new version and enable DHCPv6


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/include/config.h
diff -u src/external/bsd/dhcp/include/config.h:1.4 src/external/bsd/dhcp/include/config.h:1.5
--- src/external/bsd/dhcp/include/config.h:1.4	Wed Mar 27 00:38:54 2013
+++ src/external/bsd/dhcp/include/config.h	Sat Jul 12 20:03:19 2014
@@ -1,6 +1,9 @@
 /* includes/config.h.  Generated from config.h.in by configure.  */
 /* includes/config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
 /* Define to compile debug-only DHCP software. */
 /* #undef DEBUG */
 
@@ -12,11 +15,8 @@
 #include sys/endian.h
 #define DHCP_BYTE_ORDER _BYTE_ORDER
 
-#if 0
-/* From the Makefile */
 /* Define to 1 to include DHCPv6 support. */
 #define DHCPv6 1
-#endif
 
 /* Define to any value to chroot() prior to loading config. */
 /* #undef EARLY_CHROOT */
@@ -34,7 +34,7 @@
(struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
MSVC and with C++ compilers. */
-#define FLEXIBLE_ARRAY_MEMBER 
+#define FLEXIBLE_ARRAY_MEMBER /**/
 
 /* Define to 1 to use the Berkeley Packet Filter interface code. */
 #define HAVE_BPF 1
@@ -70,7 +70,7 @@
 #define HAVE_REGEX_H 1
 
 /* Define to 1 if the sockaddr structure has a length field. */
-#define HAVE_SA_LEN 
+#define HAVE_SA_LEN /**/
 
 /* Define to 1 if you have the stdint.h header file. */
 #define HAVE_STDINT_H 1
@@ -84,6 +84,9 @@
 /* Define to 1 if you have the string.h header file. */
 #define HAVE_STRING_H 1
 
+/* Define to 1 if you have the `strlcat' function. */
+#define HAVE_STRLCAT 1
+
 /* Define to 1 if you have the sys/socket.h header file. */
 #define HAVE_SYS_SOCKET_H 1
 
@@ -121,13 +124,16 @@
 #define PACKAGE_NAME DHCP
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING DHCP 4.2.5-P1
+#define PACKAGE_STRING DHCP 4.3.0
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME dhcp
 
+/* Define to the home page for this package. */
+#define PACKAGE_URL 
+
 /* Define to the version of this package. */
-#define PACKAGE_VERSION 4.2.5-P1
+#define PACKAGE_VERSION 4.3.0
 
 /* Define to any value to include Ari's PARANOIA patch. */
 /* #undef PARANOIA */
@@ -147,23 +153,45 @@
 /* Define to 1 to use the standard BSD socket API. */
 /* #undef USE_SOCKETS */
 
-/* Define to 1 to enable IPv4 packet info support. */
-/* #undef USE_V4_PKTINFO */
-
-/* Version number of package */
-#define VERSION 4.2.5-P1
-
-/* Define to 1 if on AIX 3.
-   System headers sometimes define this.
-   We just want to avoid a redefinition error message.  */
+/* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 /* # undef _ALL_SOURCE */
 #endif
-
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # define _GNU_SOURCE 1
 #endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Define to 1 to enable IPv4 packet info support. */
+/* #undef USE_V4_PKTINFO */
+
+/* Version number of package */
+#define VERSION 4.3.0
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+   significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+#  define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* #  undef WORDS_BIGENDIAN */
+# endif
+#endif
 
 /* Define to 1 if on MINIX. */
 /* #undef _MINIX */
@@ -206,31 +234,20 @@
 /* #undef _POSIX_SOURCE */
 
 /* Define for Solaris 2.5.1 so the uint32_t typedef from sys/synch.h,
-   pthread.h, or semaphore.h is not used. If the typedef was allowed, the
+   pthread.h, or semaphore.h is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
 /* #undef _UINT32_T */
 
 /* Define for Solaris 2.5.1 so the uint64_t typedef from sys/synch.h,
-   pthread.h, or semaphore.h is not used. If the typedef was allowed, the
+   pthread.h, or semaphore.h is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
 /* #undef _UINT64_T */
 
 /* Define for Solaris 2.5.1 so the uint8_t typedef from sys/synch.h,
-   pthread.h, or semaphore.h is not used. If 

CVS commit: src/external/bsd/dhcp/dist/common

2014-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar  7 01:04:30 UTC 2014

Modified Files:
src/external/bsd/dhcp/dist/common: ns_name.c

Log Message:
fix incorrect overflow test: https://android-review.googlesource.com/#/c/50570/


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/dist/common/ns_name.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/common/ns_name.c
diff -u src/external/bsd/dhcp/dist/common/ns_name.c:1.4 src/external/bsd/dhcp/dist/common/ns_name.c:1.5
--- src/external/bsd/dhcp/dist/common/ns_name.c:1.4	Tue Mar 26 20:38:08 2013
+++ src/external/bsd/dhcp/dist/common/ns_name.c	Thu Mar  6 20:04:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_name.c,v 1.4 2013/03/27 00:38:08 christos Exp $	*/
+/*	$NetBSD: ns_name.c,v 1.5 2014/03/07 01:04:29 christos Exp $	*/
 
 /*
  * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. (ISC)
@@ -24,7 +24,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: ns_name.c,v 1.4 2013/03/27 00:38:08 christos Exp $);
+__RCSID($NetBSD: ns_name.c,v 1.5 2014/03/07 01:04:29 christos Exp $);
 
 #ifndef lint
 static const char rcsid[] = Id: ns_name.c,v 1.2 2009/10/28 04:12:29 sar Exp ;
@@ -344,11 +344,12 @@ MRns_name_unpack(const u_char *msg, cons
 			}
 			if (len  0)
 len = srcp - src + 1;
-			srcp = msg + (((n  0x3f)  8) | (*srcp  0xff));
-			if (srcp  msg || srcp = eom) {  /* Out of range. */
+			n = ((n  0x3f)  8) | (*srcp  0xff);
+			if (n = eom - msg) {  / Out of range. */
 errno = EMSGSIZE;
 return (-1);
 			}
+			srcp = msg + n;
 			checked += 2;
 			/*
 			 * Check for loops in the compressed name;



CVS commit: src/external/bsd/dhcp/dist/common

2014-03-06 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Mar  7 05:51:44 UTC 2014

Modified Files:
src/external/bsd/dhcp/dist/common: ns_name.c

Log Message:
Fix (back into) comment


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/dhcp/dist/common/ns_name.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/common/ns_name.c
diff -u src/external/bsd/dhcp/dist/common/ns_name.c:1.5 src/external/bsd/dhcp/dist/common/ns_name.c:1.6
--- src/external/bsd/dhcp/dist/common/ns_name.c:1.5	Fri Mar  7 01:04:29 2014
+++ src/external/bsd/dhcp/dist/common/ns_name.c	Fri Mar  7 05:51:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_name.c,v 1.5 2014/03/07 01:04:29 christos Exp $	*/
+/*	$NetBSD: ns_name.c,v 1.6 2014/03/07 05:51:44 matt Exp $	*/
 
 /*
  * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. (ISC)
@@ -24,7 +24,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: ns_name.c,v 1.5 2014/03/07 01:04:29 christos Exp $);
+__RCSID($NetBSD: ns_name.c,v 1.6 2014/03/07 05:51:44 matt Exp $);
 
 #ifndef lint
 static const char rcsid[] = Id: ns_name.c,v 1.2 2009/10/28 04:12:29 sar Exp ;
@@ -345,7 +345,7 @@ MRns_name_unpack(const u_char *msg, cons
 			if (len  0)
 len = srcp - src + 1;
 			n = ((n  0x3f)  8) | (*srcp  0xff);
-			if (n = eom - msg) {  / Out of range. */
+			if (n = eom - msg) {  /* Out of range. */
 errno = EMSGSIZE;
 return (-1);
 			}



CVS commit: src/external/bsd/dhcp/dist/client

2014-02-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb  4 22:34:39 UTC 2014

Modified Files:
src/external/bsd/dhcp/dist/client: dhclient.c

Log Message:
Wait for all the interfaces specified on the command line to be configured
before daemonizing, not just the first one. Perhaps we should introduce a
separate flag for this behavior?


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/dhcp/dist/client/dhclient.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/client/dhclient.c
diff -u src/external/bsd/dhcp/dist/client/dhclient.c:1.7 src/external/bsd/dhcp/dist/client/dhclient.c:1.8
--- src/external/bsd/dhcp/dist/client/dhclient.c:1.7	Thu Jun 20 11:14:03 2013
+++ src/external/bsd/dhcp/dist/client/dhclient.c	Tue Feb  4 17:34:39 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $	*/
+/*	$NetBSD: dhclient.c,v 1.8 2014/02/04 22:34:39 christos Exp $	*/
 
 /* dhclient.c
 
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $);
+__RCSID($NetBSD: dhclient.c,v 1.8 2014/02/04 22:34:39 christos Exp $);
 
 #include dhcpd.h
 #include syslog.h
@@ -60,6 +60,7 @@ isc_boolean_t hw_mismatch_drop = ISC_TRU
 int dhcp_max_agent_option_packet_length = 0;
 
 int interfaces_requested = 0;
+int interfaces_left = 0;
 
 struct iaddr iaddr_broadcast = { 4, { 255, 255, 255, 255 } };
 struct iaddr iaddr_any = { 4, { 0, 0, 0, 0 } };
@@ -367,8 +368,10 @@ main(int argc, char **argv) {
 	 */
 	go_daemon();
 	setup();
-	if (interfaces_requested  0)
+	if (interfaces_requested  0) {
 		add_interfaces(ifaces, interfaces_requested);
+		interfaces_left = interfaces_requested;
+	}
 	free(ifaces);
 	if (wanted_ia_na  0) {
 		wanted_ia_na = 1;
@@ -894,7 +897,7 @@ int find_subnet (struct subnet **sp,
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $);
+__RCSID($NetBSD: dhclient.c,v 1.8 2014/02/04 22:34:39 christos Exp $);
 
 void state_reboot (cpp)
 	void *cpp;
@@ -3486,6 +3489,9 @@ void finish_daemon (void)
 	if (no_daemon)
 		return;
 
+	if (interfaces_left  --interfaces_left)
+		return;
+
 	/* Only do it once. */
 	if (state)
 		return;



CVS commit: src/external/bsd/dhcp

2014-01-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan 16 13:55:46 UTC 2014

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
kill debug


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.9 src/external/bsd/dhcp/Makefile.inc:1.10
--- src/external/bsd/dhcp/Makefile.inc:1.9	Wed Jan 15 20:15:33 2014
+++ src/external/bsd/dhcp/Makefile.inc	Thu Jan 16 08:55:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.9 2014/01/16 01:15:33 christos Exp $
+# $NetBSD: Makefile.inc,v 1.10 2014/01/16 13:55:46 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -20,7 +20,7 @@ DSTOBJDIR!=cd ${.PARSEDIR}/lib/dst  ${
 .if (${USE_INET6} != no)
 CPPFLAGS+=	-DDHCPv6
 .endif
-CPPFLAGS+= -DISC_PLATFORM_USETHREADS -DHAVE_CONFIG_H -DDEBUG
+CPPFLAGS+= -DISC_PLATFORM_USETHREADS -DHAVE_CONFIG_H
 CPPFLAGS+= -I${DIST} -I${DIST}/includes -I${DIST}/../include
 CPPFLAGS+= -I${BIND} -I${BIND}/includes -I${BIND}/../include
 .for dir in isc dns



CVS commit: src/external/bsd/dhcp/dist/common

2013-12-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 19 22:05:58 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/common: alloc.c discover.c

Log Message:
more casts


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/dhcp/dist/common/alloc.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcp/dist/common/discover.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/common/alloc.c
diff -u src/external/bsd/dhcp/dist/common/alloc.c:1.1.1.2 src/external/bsd/dhcp/dist/common/alloc.c:1.2
--- src/external/bsd/dhcp/dist/common/alloc.c:1.1.1.2	Sun Mar 24 18:50:29 2013
+++ src/external/bsd/dhcp/dist/common/alloc.c	Thu Dec 19 17:05:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: alloc.c,v 1.1.1.2 2013/03/24 22:50:29 christos Exp $	*/
+/*	$NetBSD: alloc.c,v 1.2 2013/12/19 22:05:58 christos Exp $	*/
 
 /* alloc.c
 
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: alloc.c,v 1.1.1.2 2013/03/24 22:50:29 christos Exp $);
+__RCSID($NetBSD: alloc.c,v 1.2 2013/12/19 22:05:58 christos Exp $);
 
 #include dhcpd.h
 #include omapip/omapip_p.h
@@ -146,7 +146,7 @@ int option_chain_head_dereference (ptr, 
 		cdr = car - cdr;
 		if (car - car)
 			option_cache_dereference ((struct option_cache **)
-		  (car - car), MDL);
+		  (void *)(car - car), MDL);
 		dfree (car, MDL);
 		car = cdr;
 	}

Index: src/external/bsd/dhcp/dist/common/discover.c
diff -u src/external/bsd/dhcp/dist/common/discover.c:1.2 src/external/bsd/dhcp/dist/common/discover.c:1.3
--- src/external/bsd/dhcp/dist/common/discover.c:1.2	Sun Mar 24 11:53:58 2013
+++ src/external/bsd/dhcp/dist/common/discover.c	Thu Dec 19 17:05:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: discover.c,v 1.2 2013/03/24 15:53:58 christos Exp $	*/
+/*	$NetBSD: discover.c,v 1.3 2013/12/19 22:05:58 christos Exp $	*/
 
 /* discover.c
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: discover.c,v 1.2 2013/03/24 15:53:58 christos Exp $);
+__RCSID($NetBSD: discover.c,v 1.3 2013/12/19 22:05:58 christos Exp $);
 
 #include dhcpd.h
 
@@ -1580,7 +1580,7 @@ isc_result_t dhcp_interface_destroy (oma
 		interface - client = (struct client_state *)0;
 
 	if (interface - shared_network)
-		omapi_object_dereference ((omapi_object_t **)
+		omapi_object_dereference ((void *)
 	  interface - shared_network, MDL);
 
 	return ISC_R_SUCCESS;



CVS commit: src/external/bsd/dhcp

2013-07-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jul 27 18:16:26 UTC 2013

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
- conditionalize on mkcrypto
- add libraries


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.4 src/external/bsd/dhcp/Makefile.inc:1.5
--- src/external/bsd/dhcp/Makefile.inc:1.4	Sun Apr 14 12:28:57 2013
+++ src/external/bsd/dhcp/Makefile.inc	Sat Jul 27 14:16:26 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.4 2013/04/14 16:28:57 christos Exp $
+# $NetBSD: Makefile.inc,v 1.5 2013/07/27 18:16:26 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -39,9 +39,11 @@ LDADD+=-lpthread
 .if defined(PROG)  ${PROG} == dhclient
 LDADD+=-Wl,-Bdynamic
 .endif
-LDADD+= -lcrypto -lipsec
+.if (${MKCRYPTO} != no)
+LDADD+= -lgssapi -lkrb5 -lcrypto -lipsec
+DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBCRYPTO} ${LIBIPSEC}
+.endif
 DPADD+= ${COBJDIR}/libdhcp.a
 DPADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
 DPADD+=	${LIBDNS} ${LIBISC}
-DPADD+= ${LIBCRYPTO} ${LIBIPSEC}
 DPADD+= ${LIBPTHREAD}



CVS commit: src/external/bsd/dhcp/dist/client

2013-06-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 12:15:38 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/client: dhclient.8

Log Message:
document -m flag


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/dhcp/dist/client/dhclient.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/client/dhclient.8
diff -u src/external/bsd/dhcp/dist/client/dhclient.8:1.1.1.2 src/external/bsd/dhcp/dist/client/dhclient.8:1.2
--- src/external/bsd/dhcp/dist/client/dhclient.8:1.1.1.2	Sun Mar 24 18:50:27 2013
+++ src/external/bsd/dhcp/dist/client/dhclient.8	Thu Jun 20 08:15:38 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: dhclient.8,v 1.1.1.2 2013/03/24 22:50:27 christos Exp $
+.\	$NetBSD: dhclient.8,v 1.2 2013/06/20 12:15:38 christos Exp $
 .\
 .\	Id: dhclient.8,v 1.32.24.4 2011/04/15 22:12:50 sar Exp 
 .\
@@ -76,6 +76,9 @@ dhclient - Dynamic Host Configuration Pr
 .B -q
 ]
 [
+.B -m
+]
+[
 .B -1
 ]
 [
@@ -249,6 +252,10 @@ inittab on System V systems.  This impli
 Become a daemon immediately (nowait) rather than waiting until an
 an IP address has been acquired.
 .TP
+.BI \-m
+Don't require that the responding ethernet address of the dhcp server
+matches the one we expect.
+.TP
 .BI \-q
 Be quiet at startup, this is the default.
 .TP



CVS commit: src/external/bsd/dhcp/dist/client

2013-06-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 12:24:08 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/client: dhc6.c dhclient.c

Log Message:
1. don't try to open the pid file if the path is NULL
2. daemonize in two stages: always fork() first and wait for the child to tell
   us when the interface is ready, so that we don't lose track of the file
   descriptors since we are threaded.
3. Add an option (-m) not to match the hardware address of the responding
   dhcp server.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/dist/client/dhc6.c
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/dhcp/dist/client/dhclient.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/client/dhc6.c
diff -u src/external/bsd/dhcp/dist/client/dhc6.c:1.4 src/external/bsd/dhcp/dist/client/dhc6.c:1.5
--- src/external/bsd/dhcp/dist/client/dhc6.c:1.4	Tue Mar 26 20:38:07 2013
+++ src/external/bsd/dhcp/dist/client/dhc6.c	Thu Jun 20 08:24:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhc6.c,v 1.4 2013/03/27 00:38:07 christos Exp $	*/
+/*	$NetBSD: dhc6.c,v 1.5 2013/06/20 12:24:08 christos Exp $	*/
 
 /* dhc6.c - DHCPv6 client routines. */
 
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: dhc6.c,v 1.4 2013/03/27 00:38:07 christos Exp $);
+__RCSID($NetBSD: dhc6.c,v 1.5 2013/06/20 12:24:08 christos Exp $);
 
 #include dhcpd.h
 
@@ -1371,7 +1371,7 @@ start_init6(struct client_state *client)
 	add_timeout(tv, do_init6, client, NULL, NULL);
 
 	if (nowait)
-		go_daemon();
+		finish_daemon();
 }
 
 /*

Index: src/external/bsd/dhcp/dist/client/dhclient.c
diff -u src/external/bsd/dhcp/dist/client/dhclient.c:1.5 src/external/bsd/dhcp/dist/client/dhclient.c:1.6
--- src/external/bsd/dhcp/dist/client/dhclient.c:1.5	Sun Jun 16 19:49:50 2013
+++ src/external/bsd/dhcp/dist/client/dhclient.c	Thu Jun 20 08:24:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhclient.c,v 1.5 2013/06/16 23:49:50 christos Exp $	*/
+/*	$NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $	*/
 
 /* dhclient.c
 
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: dhclient.c,v 1.5 2013/06/16 23:49:50 christos Exp $);
+__RCSID($NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $);
 
 #include dhcpd.h
 #include syslog.h
@@ -55,6 +55,7 @@ char *path_dhclient_script = path_dhclie
 
 /* False (default) = we write and use a pid file */
 isc_boolean_t no_pid_file = ISC_FALSE;
+isc_boolean_t hw_mismatch_drop = ISC_TRUE;
 
 int dhcp_max_agent_option_packet_length = 0;
 
@@ -344,6 +345,8 @@ main(int argc, char **argv) {
 usage();
 			}
 #endif /* DHCPv6 */
+		} else if (!strcmp(argv[i], -m)) {
+			hw_mismatch_drop = ISC_FALSE;
 		} else if (!strcmp(argv[i], -v)) {
 			quiet = 0;
 		} else if (!strcmp(argv[i], --version)) {
@@ -362,8 +365,7 @@ main(int argc, char **argv) {
 	 * Do this before setup, otherwise if we are using threads things
 	 * are not going to work
 	 */
-	if (nowait)
-		go_daemon();
+	go_daemon();
 	setup();
 	if (interfaces_requested  0)
 		add_interfaces(ifaces, interfaces_requested);
@@ -431,7 +433,8 @@ main(int argc, char **argv) {
 	 * to write a pid file - we assume they are controlling
 	 * the process in some other fashion.
 	 */
-	if ((release_mode || exit_mode)  (no_pid_file == ISC_FALSE)) {
+	if (path_dhclient_pid != NULL 
+	(release_mode || exit_mode)  (no_pid_file == ISC_FALSE)) {
 		FILE *pidfd;
 		pid_t oldpid;
 		long temp;
@@ -712,8 +715,6 @@ main(int argc, char **argv) {
 	dmalloc_longterm = dmalloc_outstanding;
 	dmalloc_outstanding = 0;
 #endif
-
-
 	/* If we're not going to daemonize, write the pid file
 	   now. */
 	if (no_daemon || nowait)
@@ -736,9 +737,9 @@ static void usage()
 
 	log_fatal(Usage: dhclient 
 #ifdef DHCPv6
-		  [-4|-6] [-SNTP1dvrx] [-nw] [-p port] [-D LL|LLT]\n
+		  [-4|-6] [-SNTP1dvrx] [-nw] [-m] [-p port] [-D LL|LLT]\n
 #else /* DHCPv6 */
-		  [-1dvrx] [-nw] [-p port]\n
+		  [-1dvrx] [-nw] [-m] [-p port]\n
 #endif /* DHCPv6 */
 		  [-s server-addr] [-cf config-file] 
 		  [-lf lease-file]\n
@@ -815,7 +816,7 @@ void run_stateless(int exit_mode)
 	/* If we're not supposed to wait before getting the address,
 	   don't. */
 	if (nowait)
-		go_daemon();
+		finish_daemon();
 
 	/* If we're not going to daemonize, write the pid file
 	   now. */
@@ -893,7 +894,7 @@ int find_subnet (struct subnet **sp,
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: dhclient.c,v 1.5 2013/06/16 23:49:50 christos Exp $);
+__RCSID($NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $);
 
 void state_reboot (cpp)
 	void *cpp;
@@ -1045,6 +1046,25 @@ void state_selecting (cpp)
 	send_request (client);
 }
 
+static isc_boolean_t
+compare_hw_address(const char *name, struct packet *packet) {
+	if (packet-interface-hw_address.hlen - 1 != packet-raw-hlen ||
+	memcmp(packet-interface-hw_address.hbuf[1],
+	

CVS commit: src/external/bsd/dhcp/dist/includes

2013-06-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 12:26:34 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/includes: dhcpd.h

Log Message:
add finish_daemon();


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/dist/includes/dhcpd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/includes/dhcpd.h
diff -u src/external/bsd/dhcp/dist/includes/dhcpd.h:1.4 src/external/bsd/dhcp/dist/includes/dhcpd.h:1.5
--- src/external/bsd/dhcp/dist/includes/dhcpd.h:1.4	Tue Mar 26 20:38:08 2013
+++ src/external/bsd/dhcp/dist/includes/dhcpd.h	Thu Jun 20 08:26:34 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhcpd.h,v 1.4 2013/03/27 00:38:08 christos Exp $	*/
+/*	$NetBSD: dhcpd.h,v 1.5 2013/06/20 12:26:34 christos Exp $	*/
 
 /* dhcpd.h
 
@@ -2753,6 +2753,7 @@ void client_envadd (struct client_state 
 
 struct client_lease *packet_to_lease (struct packet *, struct client_state *);
 void go_daemon (void);
+void finish_daemon (void);
 void write_client_pid_file (void);
 void client_location_changed (void);
 void do_release (struct client_state *);



CVS commit: src/external/bsd/dhcp/dist/client

2013-06-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun 20 15:14:03 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/client: dhclient.c

Log Message:
file descriptor neatness.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcp/dist/client/dhclient.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/client/dhclient.c
diff -u src/external/bsd/dhcp/dist/client/dhclient.c:1.6 src/external/bsd/dhcp/dist/client/dhclient.c:1.7
--- src/external/bsd/dhcp/dist/client/dhclient.c:1.6	Thu Jun 20 08:24:08 2013
+++ src/external/bsd/dhcp/dist/client/dhclient.c	Thu Jun 20 11:14:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $	*/
+/*	$NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $	*/
 
 /* dhclient.c
 
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $);
+__RCSID($NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $);
 
 #include dhcpd.h
 #include syslog.h
@@ -894,7 +894,7 @@ int find_subnet (struct subnet **sp,
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $);
+__RCSID($NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $);
 
 void state_reboot (cpp)
 	void *cpp;
@@ -3532,9 +3532,11 @@ void go_daemon (void)
 		log_fatal (Can't fork daemon: %m);
 	else if (pid) {
 		char c;
+		close(pfd[0]);
 		read(pfd[1], c, 1);
 		exit (0);
-	}
+	} else
+		close(pfd[1]);
 }
 
 void write_client_pid_file ()



CVS commit: src/external/bsd/dhcp/dist/client

2013-06-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 16 23:49:50 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/client: dhclient.c

Log Message:
Become daemon before initializing anything, otherwise this does not work
with threaded workers.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/dist/client/dhclient.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/client/dhclient.c
diff -u src/external/bsd/dhcp/dist/client/dhclient.c:1.4 src/external/bsd/dhcp/dist/client/dhclient.c:1.5
--- src/external/bsd/dhcp/dist/client/dhclient.c:1.4	Tue Mar 26 20:38:07 2013
+++ src/external/bsd/dhcp/dist/client/dhclient.c	Sun Jun 16 19:49:50 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhclient.c,v 1.4 2013/03/27 00:38:07 christos Exp $	*/
+/*	$NetBSD: dhclient.c,v 1.5 2013/06/16 23:49:50 christos Exp $	*/
 
 /* dhclient.c
 
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: dhclient.c,v 1.4 2013/03/27 00:38:07 christos Exp $);
+__RCSID($NetBSD: dhclient.c,v 1.5 2013/06/16 23:49:50 christos Exp $);
 
 #include dhcpd.h
 #include syslog.h
@@ -105,6 +105,55 @@ static int check_domain_name_list(const 
 static int check_option_values(struct universe *universe, unsigned int opt,
 			   const char *ptr, size_t len);
 
+static void
+setup(void) {
+	isc_result_t status;
+	/* Set up the isc and dns library managers */
+	status = dhcp_context_create();
+	if (status != ISC_R_SUCCESS)
+		log_fatal(Can't initialize context: %s,
+			  isc_result_totext(status));
+
+	/* Set up the OMAPI. */
+	status = omapi_init();
+	if (status != ISC_R_SUCCESS)
+		log_fatal(Can't initialize OMAPI: %s,
+			  isc_result_totext(status));
+
+	/* Set up the OMAPI wrappers for various server database internal
+	   objects. */
+	dhcp_common_objects_setup();
+
+	dhcp_interface_discovery_hook = dhclient_interface_discovery_hook;
+	dhcp_interface_shutdown_hook = dhclient_interface_shutdown_hook;
+	dhcp_interface_startup_hook = dhclient_interface_startup_hook;
+}
+
+
+static void
+add_interfaces(char **ifaces, int nifaces)
+{
+	isc_result_t status;
+
+	for (int i = 0; i  nifaces; i++) {
+		struct interface_info *tmp = NULL;
+		status = interface_allocate(tmp, MDL);
+		if (status != ISC_R_SUCCESS)
+			log_fatal(Can't record interface %s:%s,
+  ifaces[i], isc_result_totext(status));
+		if (strlen(ifaces[i]) = sizeof(tmp-name))
+			log_fatal(%s: interface name too long (is %ld),
+  ifaces[i], (long)strlen(ifaces[i]));
+		strcpy(tmp-name, ifaces[i]);
+		if (interfaces) {
+			interface_reference(tmp-next,
+		interfaces, MDL);
+			interface_dereference(interfaces, MDL);
+		}
+		interface_reference(interfaces, tmp, MDL);
+		tmp-flags = INTERFACE_REQUESTED;
+	}
+}
 int
 main(int argc, char **argv) {
 	int fd;
@@ -113,7 +162,6 @@ main(int argc, char **argv) {
 	struct client_state *client;
 	unsigned seed;
 	char *server = NULL;
-	isc_result_t status;
 	int exit_mode = 0;
 	int release_mode = 0;
 	struct timeval tv;
@@ -128,6 +176,7 @@ main(int argc, char **argv) {
 	int local_family_set = 0;
 #endif /* DHCPv6 */
 	char *s;
+	char **ifaces;
 
 	/* Initialize client globals. */
 	memset(default_duid, 0, sizeof(default_duid));
@@ -151,25 +200,10 @@ main(int argc, char **argv) {
 	setlogmask(LOG_UPTO(LOG_INFO));
 #endif
 
-	/* Set up the isc and dns library managers */
-	status = dhcp_context_create();
-	if (status != ISC_R_SUCCESS)
-		log_fatal(Can't initialize context: %s,
-			  isc_result_totext(status));
-
-	/* Set up the OMAPI. */
-	status = omapi_init();
-	if (status != ISC_R_SUCCESS)
-		log_fatal(Can't initialize OMAPI: %s,
-			  isc_result_totext(status));
-
-	/* Set up the OMAPI wrappers for various server database internal
-	   objects. */
-	dhcp_common_objects_setup();
-
-	dhcp_interface_discovery_hook = dhclient_interface_discovery_hook;
-	dhcp_interface_shutdown_hook = dhclient_interface_shutdown_hook;
-	dhcp_interface_startup_hook = dhclient_interface_startup_hook;
+	if ((ifaces = malloc(sizeof(*ifaces) * argc)) == NULL) {
+		log_fatal(Can't allocate memory);
+		return 1;
+	}
 
 	for (i = 1; i  argc; i++) {
 		if (!strcmp(argv[i], -r)) {
@@ -320,27 +354,20 @@ main(int argc, char **argv) {
 		} else if (interfaces_requested  0) {
 		usage();
 		} else {
-		struct interface_info *tmp = NULL;
-
-		status = interface_allocate(tmp, MDL);
-		if (status != ISC_R_SUCCESS)
-			log_fatal(Can't record interface %s:%s,
-  argv[i], isc_result_totext(status));
-		if (strlen(argv[i]) = sizeof(tmp-name))
-			log_fatal(%s: interface name too long (is %ld),
-  argv[i], (long)strlen(argv[i]));
-		strcpy(tmp-name, argv[i]);
-		if (interfaces) {
-			interface_reference(tmp-next,
-		interfaces, MDL);
-			interface_dereference(interfaces, MDL);
-		}
-		

CVS commit: src/external/bsd/dhcp

2013-04-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 14 16:28:57 UTC 2013

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
Use -Wl,-B{static,dynamic}, using -Bstatic does not work because all the
flags arguments are passed to collect2 in front.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.3 src/external/bsd/dhcp/Makefile.inc:1.4
--- src/external/bsd/dhcp/Makefile.inc:1.3	Sun Mar 24 19:03:05 2013
+++ src/external/bsd/dhcp/Makefile.inc	Sun Apr 14 12:28:57 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.3 2013/03/24 23:03:05 christos Exp $
+# $NetBSD: Makefile.inc,v 1.4 2013/04/14 16:28:57 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -32,12 +32,12 @@ CPPFLAGS+= -DLOCALSTATEDIR='/var'
 LDADD+= ${COBJDIR}/libdhcp.a
 LDADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
 .if defined(PROG)  ${PROG} == dhclient
-LDADD+=--static
+LDADD+=-Wl,-Bstatic
 .endif
 LDADD+= -ldns -lisc
 LDADD+=-lpthread
 .if defined(PROG)  ${PROG} == dhclient
-LDADD+=--dynamic
+LDADD+=-Wl,-Bdynamic
 .endif
 LDADD+= -lcrypto -lipsec
 DPADD+= ${COBJDIR}/libdhcp.a



CVS commit: src/external/bsd/dhcp/dist/server

2013-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 13 23:04:35 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/server: dhcpd.c

Log Message:
How could this possibly ever have worked with threads? It forked *after*
it initialized the isc library and the parent having created the threads
exited with the worker threads?!?!? Only -d worked because it did not
fork!


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/dhcp/dist/server/dhcpd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/server/dhcpd.c
diff -u src/external/bsd/dhcp/dist/server/dhcpd.c:1.1.1.2 src/external/bsd/dhcp/dist/server/dhcpd.c:1.2
--- src/external/bsd/dhcp/dist/server/dhcpd.c:1.1.1.2	Sun Mar 24 18:50:40 2013
+++ src/external/bsd/dhcp/dist/server/dhcpd.c	Sat Apr 13 19:04:35 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhcpd.c,v 1.1.1.2 2013/03/24 22:50:40 christos Exp $	*/
+/*	$NetBSD: dhcpd.c,v 1.2 2013/04/13 23:04:35 christos Exp $	*/
 
 /* dhcpd.c
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: dhcpd.c,v 1.1.1.2 2013/03/24 22:50:40 christos Exp $);
+__RCSID($NetBSD: dhcpd.c,v 1.2 2013/04/13 23:04:35 christos Exp $);
 
 static const char copyright[] =
 Copyright 2004-2013 Internet Systems Consortium.;
@@ -287,27 +287,6 @@ main(int argc, char **argv) {
 else if (fd != -1)
 close(fd);
 
-	/* Set up the isc and dns library managers */
-	status = dhcp_context_create();
-	if (status != ISC_R_SUCCESS)
-		log_fatal(Can't initialize context: %s,
-			  isc_result_totext(status));
-
-	/* Set up the client classification system. */
-	classification_setup ();
-
-	/* Initialize the omapi system. */
-	result = omapi_init ();
-	if (result != ISC_R_SUCCESS)
-		log_fatal (Can't initialize OMAPI: %s,
-			   isc_result_totext (result));
-
-	/* Set up the OMAPI wrappers for common objects. */
-	dhcp_db_objects_setup ();
-	/* Set up the OMAPI wrappers for various server database internal
-	   objects. */
-	dhcp_common_objects_setup ();
-
 	/* Initially, log errors to stderr as well as to syslogd. */
 	openlog (dhcpd, LOG_NDELAY, DHCPD_LOG_FACILITY);
 
@@ -488,6 +467,40 @@ main(int argc, char **argv) {
 		quiet = 0;
 		log_perror = 0;
 	}
+#ifndef DEBUG
+	/*
+	 * We need to fork before we call the context create
+	 * call that creates the worker threads!
+	 */
+	if (daemon) {
+		/* First part of becoming a daemon... */
+		if ((pid = fork ())  0)
+			log_fatal (Can't fork daemon: %m);
+		else if (pid)
+			exit (0);
+	}
+#endif
+
+	/* Set up the isc and dns library managers */
+	status = dhcp_context_create();
+	if (status != ISC_R_SUCCESS)
+		log_fatal(Can't initialize context: %s,
+			  isc_result_totext(status));
+
+	/* Set up the client classification system. */
+	classification_setup ();
+
+	/* Initialize the omapi system. */
+	result = omapi_init ();
+	if (result != ISC_R_SUCCESS)
+		log_fatal (Can't initialize OMAPI: %s,
+			   isc_result_totext (result));
+
+	/* Set up the OMAPI wrappers for common objects. */
+	dhcp_db_objects_setup ();
+	/* Set up the OMAPI wrappers for various server database internal
+	   objects. */
+	dhcp_common_objects_setup ();
 
 #if defined (TRACING)
 	trace_init (set_time, MDL);
@@ -770,13 +783,6 @@ main(int argc, char **argv) {
 #endif /* DHCPv6 */
 
 #ifndef DEBUG
-	if (daemon) {
-		/* First part of becoming a daemon... */
-		if ((pid = fork ())  0)
-			log_fatal (Can't fork daemon: %m);
-		else if (pid)
-			exit (0);
-	}
  
 #if defined (PARANOIA)
 	/* change uid to the specified one */



CVS commit: src/external/bsd/dhcp/dist/server

2013-04-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 14 01:51:39 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/server: dhcpd.c

Log Message:
initialize the omapi subsystem early so we can allocate interfaces.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcp/dist/server/dhcpd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/server/dhcpd.c
diff -u src/external/bsd/dhcp/dist/server/dhcpd.c:1.2 src/external/bsd/dhcp/dist/server/dhcpd.c:1.3
--- src/external/bsd/dhcp/dist/server/dhcpd.c:1.2	Sat Apr 13 19:04:35 2013
+++ src/external/bsd/dhcp/dist/server/dhcpd.c	Sat Apr 13 21:51:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhcpd.c,v 1.2 2013/04/13 23:04:35 christos Exp $	*/
+/*	$NetBSD: dhcpd.c,v 1.3 2013/04/14 01:51:39 christos Exp $	*/
 
 /* dhcpd.c
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: dhcpd.c,v 1.2 2013/04/13 23:04:35 christos Exp $);
+__RCSID($NetBSD: dhcpd.c,v 1.3 2013/04/14 01:51:39 christos Exp $);
 
 static const char copyright[] =
 Copyright 2004-2013 Internet Systems Consortium.;
@@ -287,6 +287,18 @@ main(int argc, char **argv) {
 else if (fd != -1)
 close(fd);
 
+	/* Initialize the omapi system. */
+	result = omapi_init ();
+	if (result != ISC_R_SUCCESS)
+		log_fatal (Can't initialize OMAPI: %s,
+			   isc_result_totext (result));
+
+	/* Set up the OMAPI wrappers for common objects. */
+	dhcp_db_objects_setup ();
+	/* Set up the OMAPI wrappers for various server database internal
+	   objects. */
+	dhcp_common_objects_setup ();
+
 	/* Initially, log errors to stderr as well as to syslogd. */
 	openlog (dhcpd, LOG_NDELAY, DHCPD_LOG_FACILITY);
 
@@ -489,19 +501,6 @@ main(int argc, char **argv) {
 
 	/* Set up the client classification system. */
 	classification_setup ();
-
-	/* Initialize the omapi system. */
-	result = omapi_init ();
-	if (result != ISC_R_SUCCESS)
-		log_fatal (Can't initialize OMAPI: %s,
-			   isc_result_totext (result));
-
-	/* Set up the OMAPI wrappers for common objects. */
-	dhcp_db_objects_setup ();
-	/* Set up the OMAPI wrappers for various server database internal
-	   objects. */
-	dhcp_common_objects_setup ();
-
 #if defined (TRACING)
 	trace_init (set_time, MDL);
 	if (traceoutfile) {



CVS commit: src/external/bsd/dhcp/dist/common

2013-04-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr  8 02:16:03 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/common: bpf.c

Log Message:
Use the active link local layer address instead of the first one you find.
It would be nice if getifaddrs gave all the information needed instead of
needed a separate ioctl. Or at least if the inactive addresses were marked
down in flags?


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/dhcp/dist/common/bpf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/common/bpf.c
diff -u src/external/bsd/dhcp/dist/common/bpf.c:1.1.1.2 src/external/bsd/dhcp/dist/common/bpf.c:1.2
--- src/external/bsd/dhcp/dist/common/bpf.c:1.1.1.2	Tue Mar 26 20:31:33 2013
+++ src/external/bsd/dhcp/dist/common/bpf.c	Sun Apr  7 22:16:03 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.1.1.2 2013/03/27 00:31:33 christos Exp $	*/
+/*	$NetBSD: bpf.c,v 1.2 2013/04/08 02:16:03 christos Exp $	*/
 
 /* bpf.c
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: bpf.c,v 1.1.1.2 2013/03/27 00:31:33 christos Exp $);
+__RCSID($NetBSD: bpf.c,v 1.2 2013/04/08 02:16:03 christos Exp $);
 
 #include dhcpd.h
 #if defined (USE_BPF_SEND) || defined (USE_BPF_RECEIVE)	\
@@ -54,6 +54,7 @@ __RCSID($NetBSD: bpf.c,v 1.1.1.2 2013/0
 #  endif
 # endif
 
+#include sys/param.h
 #include netinet/in_systm.h
 #include includes/netinet/ip.h
 #include includes/netinet/udp.h
@@ -556,11 +557,50 @@ void maybe_setup_fallback ()
 	}
 }
 
+static int
+lladdr_active(int s, const char *name, const struct ifaddrs *ifa)
+{
+	if (ifa-ifa_addr-sa_family != AF_LINK)
+		return 0;
+	if (strcmp(ifa-ifa_name, name) != 0)
+		return 0;
+
+#ifdef SIOCGLIFADDR
+{
+	struct if_laddrreq iflr;
+	const struct sockaddr_dl *sdl;
+
+	sdl = satocsdl(ifa-ifa_addr);
+	memset(iflr, 0, sizeof(iflr));
+
+	strlcpy(iflr.iflr_name, ifa-ifa_name, sizeof(iflr.iflr_name));
+	memcpy(iflr.addr, ifa-ifa_addr, MIN(ifa-ifa_addr-sa_len,
+	sizeof(iflr.addr)));
+	iflr.flags = IFLR_PREFIX;
+	iflr.prefixlen = sdl-sdl_alen * NBBY;
+
+	if (ioctl(s, SIOCGLIFADDR, iflr) == -1) {
+		log_fatal(ioctl(SIOCGLIFADDR): %m);
+	}
+
+	if ((iflr.flags  IFLR_ACTIVE) == 0)
+		return 0;
+}
+#endif
+	return 1;
+}
+
+
 void
 get_hw_addr(const char *name, struct hardware *hw) {
 	struct ifaddrs *ifa;
 	struct ifaddrs *p;
 	struct sockaddr_dl *sa;
+	int s;
+
+	if ((s = socket(AF_LINK, SOCK_DGRAM, 0)) == -1) {
+		log_fatal(socket AF_LINK: %m);
+	}
 
 	if (getifaddrs(ifa) != 0) {
 		log_fatal(Error getting interface information; %m);
@@ -570,15 +610,16 @@ get_hw_addr(const char *name, struct har
 	 * Loop through our interfaces finding a match.
 	 */
 	sa = NULL;
-	for (p=ifa; (p != NULL)  (sa == NULL); p = p-ifa_next) {
-		if ((p-ifa_addr-sa_family == AF_LINK)  
-		!strcmp(p-ifa_name, name)) {
+	for (p = ifa; p != NULL; p = p-ifa_next) {
+		if (lladdr_active(s, name, p)) {
 			sa = (struct sockaddr_dl *)p-ifa_addr;
+			break;
 		}
 	}
 	if (sa == NULL) {
 		log_fatal(No interface called '%s', name);
 	}
+	close(s);
 
 	/*
 	 * Pull out the appropriate information.



CVS commit: src/external/bsd/dhcp/dist

2013-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 27 00:38:09 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/client: dhc6.c dhclient.c
src/external/bsd/dhcp/dist/common: dispatch.c dns.c ns_name.c
src/external/bsd/dhcp/dist/dst: base64.c dst_api.c
src/external/bsd/dhcp/dist/includes: dhcpd.h
src/external/bsd/dhcp/dist/relay: dhcrelay.c
src/external/bsd/dhcp/dist/server: dhcpleasequery.c dhcpv6.c mdb6.c

Log Message:
welcome to 4.2.5-P1


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcp/dist/client/dhc6.c \
src/external/bsd/dhcp/dist/client/dhclient.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcp/dist/common/dispatch.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcp/dist/common/dns.c \
src/external/bsd/dhcp/dist/common/ns_name.c
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/dist/dst/base64.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcp/dist/dst/dst_api.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcp/dist/includes/dhcpd.h
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcp/dist/relay/dhcrelay.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcp/dist/server/dhcpleasequery.c \
src/external/bsd/dhcp/dist/server/dhcpv6.c \
src/external/bsd/dhcp/dist/server/mdb6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/client/dhc6.c
diff -u src/external/bsd/dhcp/dist/client/dhc6.c:1.3 src/external/bsd/dhcp/dist/client/dhc6.c:1.4
--- src/external/bsd/dhcp/dist/client/dhc6.c:1.3	Sun Mar 24 19:03:05 2013
+++ src/external/bsd/dhcp/dist/client/dhc6.c	Tue Mar 26 20:38:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhc6.c,v 1.3 2013/03/24 23:03:05 christos Exp $	*/
+/*	$NetBSD: dhc6.c,v 1.4 2013/03/27 00:38:07 christos Exp $	*/
 
 /* dhc6.c - DHCPv6 client routines. */
 
@@ -25,6 +25,9 @@
  *   https://www.isc.org/
  */
 
+#include sys/cdefs.h
+__RCSID($NetBSD: dhc6.c,v 1.4 2013/03/27 00:38:07 christos Exp $);
+
 #include dhcpd.h
 
 #ifdef DHCPv6
Index: src/external/bsd/dhcp/dist/client/dhclient.c
diff -u src/external/bsd/dhcp/dist/client/dhclient.c:1.3 src/external/bsd/dhcp/dist/client/dhclient.c:1.4
--- src/external/bsd/dhcp/dist/client/dhclient.c:1.3	Sun Mar 24 19:03:05 2013
+++ src/external/bsd/dhcp/dist/client/dhclient.c	Tue Mar 26 20:38:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhclient.c,v 1.3 2013/03/24 23:03:05 christos Exp $	*/
+/*	$NetBSD: dhclient.c,v 1.4 2013/03/27 00:38:07 christos Exp $	*/
 
 /* dhclient.c
 
@@ -32,6 +32,9 @@
  * fault and not Elliot's.
  */
 
+#include sys/cdefs.h
+__RCSID($NetBSD: dhclient.c,v 1.4 2013/03/27 00:38:07 christos Exp $);
+
 #include dhcpd.h
 #include syslog.h
 #include signal.h
@@ -866,6 +869,9 @@ int find_subnet (struct subnet **sp,
  * can no longer legitimately use the lease.
  */
 
+#include sys/cdefs.h
+__RCSID($NetBSD: dhclient.c,v 1.4 2013/03/27 00:38:07 christos Exp $);
+
 void state_reboot (cpp)
 	void *cpp;
 {

Index: src/external/bsd/dhcp/dist/common/dispatch.c
diff -u src/external/bsd/dhcp/dist/common/dispatch.c:1.2 src/external/bsd/dhcp/dist/common/dispatch.c:1.3
--- src/external/bsd/dhcp/dist/common/dispatch.c:1.2	Sun Mar 24 11:53:58 2013
+++ src/external/bsd/dhcp/dist/common/dispatch.c	Tue Mar 26 20:38:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dispatch.c,v 1.2 2013/03/24 15:53:58 christos Exp $	*/
+/*	$NetBSD: dispatch.c,v 1.3 2013/03/27 00:38:07 christos Exp $	*/
 
 /* dispatch.c
 
@@ -28,6 +28,9 @@
  *
  */
 
+#include sys/cdefs.h
+__RCSID($NetBSD: dispatch.c,v 1.3 2013/03/27 00:38:07 christos Exp $);
+
 #include dhcpd.h
 
 #include sys/time.h

Index: src/external/bsd/dhcp/dist/common/dns.c
diff -u src/external/bsd/dhcp/dist/common/dns.c:1.3 src/external/bsd/dhcp/dist/common/dns.c:1.4
--- src/external/bsd/dhcp/dist/common/dns.c:1.3	Sun Mar 24 19:03:06 2013
+++ src/external/bsd/dhcp/dist/common/dns.c	Tue Mar 26 20:38:07 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dns.c,v 1.3 2013/03/24 23:03:06 christos Exp $	*/
+/*	$NetBSD: dns.c,v 1.4 2013/03/27 00:38:07 christos Exp $	*/
 
 /* dns.c
 
@@ -32,6 +32,9 @@
  * asynchronous DNS routines.
  */
 
+#include sys/cdefs.h
+__RCSID($NetBSD: dns.c,v 1.4 2013/03/27 00:38:07 christos Exp $);
+
 #include dhcpd.h
 #include arpa/nameser.h
 #include isc/md5.h
Index: src/external/bsd/dhcp/dist/common/ns_name.c
diff -u src/external/bsd/dhcp/dist/common/ns_name.c:1.3 src/external/bsd/dhcp/dist/common/ns_name.c:1.4
--- src/external/bsd/dhcp/dist/common/ns_name.c:1.3	Sun Mar 24 19:03:06 2013
+++ src/external/bsd/dhcp/dist/common/ns_name.c	Tue Mar 26 20:38:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ns_name.c,v 1.3 2013/03/24 23:03:06 christos Exp $	*/
+/*	$NetBSD: ns_name.c,v 1.4 2013/03/27 00:38:08 christos Exp $	*/
 
 /*
  * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. (ISC)
@@ -23,6 +23,9 @@
  *   http://www.isc.org/
  */
 
+#include sys/cdefs.h
+__RCSID($NetBSD: ns_name.c,v 1.4 2013/03/27 00:38:08 christos Exp $);
+
 

CVS commit: src/external/bsd/dhcp

2013-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 27 00:38:42 UTC 2013

Modified Files:
src/external/bsd/dhcp: dhcp2netbsd

Log Message:
make sure we add rcsids in all the files and not in the headers


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/dhcp/dhcp2netbsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dhcp2netbsd
diff -u src/external/bsd/dhcp/dhcp2netbsd:1.1 src/external/bsd/dhcp/dhcp2netbsd:1.2
--- src/external/bsd/dhcp/dhcp2netbsd:1.1	Sun Mar 24 11:54:29 2013
+++ src/external/bsd/dhcp/dhcp2netbsd	Tue Mar 26 20:38:41 2013
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: dhcp2netbsd,v 1.1 2013/03/24 15:54:29 christos Exp $
+#	$NetBSD: dhcp2netbsd,v 1.2 2013/03/27 00:38:41 christos Exp $
 #
 # Copyright (c) 2003, 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -52,18 +52,38 @@ find $FILE -type f -name '*.[chly]' -p
 	sed -e '1{/$NetBSD/!{i\
 /*	\$NetBSD\$	*/\
 
-};}' -e \
-'/www.nominum.com/ {
-	N
-	N
-	a\
-#include sys/cdefs.h\
-__RCSID(\$NetBSD\$\);\
+};}' $c  /tmp/dhcp1$$
+mv /tmp/dhcp1$$ $c  echo did source mods for $c
+done
 
+find $FILE -type f -name '*.[cly]' -print | while read c; do
+sed -e \
+'/:\/\/www.isc.org/,/^ \*\// {
+/^ \*\//a\
+\
+#include sys/cdefs.h\
+__RCSID(\$NetBSD\$);
 }' $c  /tmp/dhcp1$$
 mv /tmp/dhcp1$$ $c  echo did source mods for $c
 done
 
+ for f in dst/dst_api.c dst/dst_support.c dst/hmac_link.c dst/prandom.c \
+ omapip/inet_addr.c omapip/iscprint.c server/dhcpv6.c \
+ server/dhcpleasequery.c server/ldap.c server/mdb6.c; do
+	c=$FILE/$f
+	sed -E -e \
+'/\* TH(E|IS) SOFTWARE/,/^ \*\// {
+/^ \*\//a\
+\
+#include sys/cdefs.h\
+__RCSID(\$NetBSD\$);\
+
+}' $c  /tmp/dhcp1$$
+mv /tmp/dhcp1$$ $c  echo did source mods for $c
+done
+
+
+
  Add RCS tags to man pages
 find $FILE -type f -name '*.[0-9]' -print | while read m; do
 	sed -e '1{/$NetBSD/!i\



CVS commit: src/external/bsd/dhcp/include

2013-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 27 00:38:54 UTC 2013

Modified Files:
src/external/bsd/dhcp/include: config.h

Log Message:
update for version change


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcp/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/include/config.h
diff -u src/external/bsd/dhcp/include/config.h:1.3 src/external/bsd/dhcp/include/config.h:1.4
--- src/external/bsd/dhcp/include/config.h:1.3	Sun Mar 24 21:11:03 2013
+++ src/external/bsd/dhcp/include/config.h	Tue Mar 26 20:38:54 2013
@@ -121,13 +121,13 @@
 #define PACKAGE_NAME DHCP
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING DHCP 4.2.5
+#define PACKAGE_STRING DHCP 4.2.5-P1
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME dhcp
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION 4.2.5
+#define PACKAGE_VERSION 4.2.5-P1
 
 /* Define to any value to include Ari's PARANOIA patch. */
 /* #undef PARANOIA */
@@ -151,7 +151,7 @@
 /* #undef USE_V4_PKTINFO */
 
 /* Version number of package */
-#define VERSION 4.2.5
+#define VERSION 4.2.5-P1
 
 /* Define to 1 if on AIX 3.
System headers sometimes define this.



CVS commit: src/external/bsd/dhcp/bin/server

2013-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 25 12:59:59 UTC 2013

Added Files:
src/external/bsd/dhcp/bin/server: dhcpd.conf

Log Message:
put back example server configuration file that was removed upstream


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/bin/server/dhcpd.conf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/dhcp/bin/server/dhcpd.conf
diff -u /dev/null src/external/bsd/dhcp/bin/server/dhcpd.conf:1.1
--- /dev/null	Mon Mar 25 08:59:59 2013
+++ src/external/bsd/dhcp/bin/server/dhcpd.conf	Mon Mar 25 08:59:59 2013
@@ -0,0 +1,104 @@
+# dhcpd.conf
+#
+# Sample configuration file for ISC dhcpd
+#
+
+# option definitions common to all supported networks...
+option domain-name example.org;
+option domain-name-servers ns1.example.org, ns2.example.org;
+
+default-lease-time 600;
+max-lease-time 7200;
+
+# If this DHCP server is the official DHCP server for the local
+# network, the authoritative directive should be uncommented.
+#authoritative;
+
+# Dynamic DNS update scheme - must be set to none, interim or ad-hoc.
+ddns-update-style none;
+
+# Use this to send dhcp log messages to a different log file (you also
+# have to hack syslog.conf to complete the redirection).
+log-facility local7;
+
+# No service will be given on this subnet, but declaring it helps the 
+# DHCP server to understand the network topology.
+
+subnet 10.152.187.0 netmask 255.255.255.0 {
+}
+
+# This is a very basic subnet declaration.
+
+subnet 10.254.239.0 netmask 255.255.255.224 {
+  range 10.254.239.10 10.254.239.20;
+  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
+}
+
+# This declaration allows BOOTP clients to get dynamic addresses,
+# which we don't really recommend.
+
+subnet 10.254.239.32 netmask 255.255.255.224 {
+  range dynamic-bootp 10.254.239.40 10.254.239.60;
+  option broadcast-address 10.254.239.31;
+  option routers rtr-239-32-1.example.org;
+}
+
+# A slightly different configuration for an internal subnet.
+subnet 10.5.5.0 netmask 255.255.255.224 {
+  range 10.5.5.26 10.5.5.30;
+  option domain-name-servers ns1.internal.example.org;
+  option domain-name internal.example.org;
+  option routers 10.5.5.1;
+  option broadcast-address 10.5.5.31;
+  default-lease-time 600;
+  max-lease-time 7200;
+}
+
+# Hosts which require special configuration options can be listed in
+# host statements.   If no address is specified, the address will be
+# allocated dynamically (if possible), but the host-specific information
+# will still come from the host declaration.
+
+host passacaglia {
+  hardware ethernet 0:0:c0:5d:bd:95;
+  filename vmunix.passacaglia;
+  server-name toccata.fugue.com;
+}
+
+# Fixed IP addresses can also be specified for hosts.   These addresses
+# should not also be listed as being available for dynamic assignment.
+# Hosts for which fixed IP addresses have been specified can boot using
+# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
+# be booted with DHCP, unless there is an address range on the subnet
+# to which a BOOTP client is connected which has the dynamic-bootp flag
+# set.
+host fantasia {
+  hardware ethernet 08:00:07:26:c0:a5;
+  fixed-address fantasia.fugue.com;
+}
+
+# You can declare a class of clients and then do address allocation
+# based on that.   The example below shows a case where all clients
+# in a certain class get addresses on the 10.17.224/24 subnet, and all
+# other clients get addresses on the 10.0.29/24 subnet.
+
+class foo {
+  match if substring (option vendor-class-identifier, 0, 4) = SUNW;
+}
+
+shared-network 224-29 {
+  subnet 10.17.224.0 netmask 255.255.255.0 {
+option routers rtr-224.example.org;
+  }
+  subnet 10.0.29.0 netmask 255.255.255.0 {
+option routers rtr-29.example.org;
+  }
+  pool {
+allow members of foo;
+range 10.17.224.10 10.17.224.250;
+  }
+  pool {
+deny members of foo;
+range 10.0.29.10 10.0.29.230;
+  }
+}



CVS commit: src/external/bsd/dhcp/dist

2013-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 24 15:46:06 UTC 2013

Update of /cvsroot/src/external/bsd/dhcp/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv21169

Log Message:
from ftp.isc.org

Status:

Vendor Tag: ISC
Release Tags:   DHCP4_2_3

N src/external/bsd/dhcp/dist/configure.ac
N src/external/bsd/dhcp/dist/README
N src/external/bsd/dhcp/dist/aclocal.m4
N src/external/bsd/dhcp/dist/Makefile.am
N src/external/bsd/dhcp/dist/Makefile.in
N src/external/bsd/dhcp/dist/configure
N src/external/bsd/dhcp/dist/depcomp
N src/external/bsd/dhcp/dist/install-sh
N src/external/bsd/dhcp/dist/missing
N src/external/bsd/dhcp/dist/RELNOTES
N src/external/bsd/dhcp/dist/LICENSE
N src/external/bsd/dhcp/dist/contrib/dhclient-tz-exithook.sh
N src/external/bsd/dhcp/dist/contrib/3.0b1-lease-convert
N src/external/bsd/dhcp/dist/contrib/sethostname.sh
N src/external/bsd/dhcp/dist/contrib/dhcp.spec
N src/external/bsd/dhcp/dist/contrib/solaris.init
N src/external/bsd/dhcp/dist/contrib/ldap/dhcpd-conf-to-ldap
N src/external/bsd/dhcp/dist/contrib/ldap/dhcp.schema
N src/external/bsd/dhcp/dist/contrib/ldap/README.ldap
N src/external/bsd/dhcp/dist/contrib/ms2isc/Registry.pm
N src/external/bsd/dhcp/dist/contrib/ms2isc/ms2isc.pl
N src/external/bsd/dhcp/dist/contrib/ms2isc/readme.txt
N src/external/bsd/dhcp/dist/dhcpctl/dhcpctl.h
N src/external/bsd/dhcp/dist/dhcpctl/omshell.1
N src/external/bsd/dhcp/dist/dhcpctl/Makefile.am
N src/external/bsd/dhcp/dist/dhcpctl/Makefile.in
N src/external/bsd/dhcp/dist/dhcpctl/dhcpctl.c
N src/external/bsd/dhcp/dist/dhcpctl/callback.c
N src/external/bsd/dhcp/dist/dhcpctl/remote.c
N src/external/bsd/dhcp/dist/dhcpctl/cltest.c
N src/external/bsd/dhcp/dist/dhcpctl/omshell.c
N src/external/bsd/dhcp/dist/dhcpctl/dhcpctl.3
N src/external/bsd/dhcp/dist/doc/References.xml
N src/external/bsd/dhcp/dist/doc/IANA-arp-parameters
N src/external/bsd/dhcp/dist/doc/Makefile
N src/external/bsd/dhcp/dist/doc/References.html
N src/external/bsd/dhcp/dist/doc/References.txt
N src/external/bsd/dhcp/dist/doc/api+protocol
N src/external/bsd/dhcp/dist/doc/examples/dhclient-dhcpv6.conf
N src/external/bsd/dhcp/dist/doc/examples/dhcpd-dhcpv6.conf
N src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient-script.8
N src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient.8
N src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient.conf.5
N src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient.leases.5
N src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhcp-eval.5
N src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhcp-options.5
N src/external/bsd/dhcp/dist/util/bindvar.sh
N src/external/bsd/dhcp/dist/includes/heap.h
N src/external/bsd/dhcp/dist/includes/Makefile.am
N src/external/bsd/dhcp/dist/includes/Makefile.in
N src/external/bsd/dhcp/dist/includes/config.h.in
N src/external/bsd/dhcp/dist/includes/cdefs.h
N src/external/bsd/dhcp/dist/includes/ctrace.h
N src/external/bsd/dhcp/dist/includes/dhcp.h
N src/external/bsd/dhcp/dist/includes/dhcp6.h
N src/external/bsd/dhcp/dist/includes/dhcpd.h
N src/external/bsd/dhcp/dist/includes/dhctoken.h
N src/external/bsd/dhcp/dist/includes/failover.h
N src/external/bsd/dhcp/dist/includes/t_api.h
N src/external/bsd/dhcp/dist/includes/inet.h
N src/external/bsd/dhcp/dist/includes/minires.h
N src/external/bsd/dhcp/dist/includes/osdep.h
N src/external/bsd/dhcp/dist/includes/site.h
N src/external/bsd/dhcp/dist/includes/statement.h
N src/external/bsd/dhcp/dist/includes/tree.h
N src/external/bsd/dhcp/dist/includes/arpa/nameser_compat.h
N src/external/bsd/dhcp/dist/includes/arpa/nameser.h
N src/external/bsd/dhcp/dist/includes/isc-dhcp/dst.h
N src/external/bsd/dhcp/dist/includes/netinet/if_ether.h
N src/external/bsd/dhcp/dist/includes/netinet/ip.h
N src/external/bsd/dhcp/dist/includes/netinet/ip_icmp.h
N src/external/bsd/dhcp/dist/includes/netinet/udp.h
N src/external/bsd/dhcp/dist/includes/omapip/convert.h
N src/external/bsd/dhcp/dist/includes/omapip/alloc.h
N src/external/bsd/dhcp/dist/includes/omapip/buffer.h
N src/external/bsd/dhcp/dist/includes/omapip/omapip_p.h
N src/external/bsd/dhcp/dist/includes/omapip/hash.h
N src/external/bsd/dhcp/dist/includes/omapip/isclib.h
N src/external/bsd/dhcp/dist/includes/omapip/omapip.h
N src/external/bsd/dhcp/dist/includes/omapip/result.h
N src/external/bsd/dhcp/dist/includes/omapip/trace.h
N src/external/bsd/dhcp/dist/tests/HOWTO-unit-test
N src/external/bsd/dhcp/dist/tests/Makefile.am
N src/external/bsd/dhcp/dist/tests/Makefile.in
N src/external/bsd/dhcp/dist/tests/t_api.c
N src/external/bsd/dhcp/dist/tests/t_api_dhcp.c
N src/external/bsd/dhcp/dist/tests/unit_test_sample.c
N src/external/bsd/dhcp/dist/tests/DHCPv6/010-solicit-noclientid.pl
N src/external/bsd/dhcp/dist/tests/DHCPv6/000-badmsgtype.pl
N src/external/bsd/dhcp/dist/tests/DHCPv6/030-request-noclientid.pl
N src/external/bsd/dhcp/dist/tests/DHCPv6/011-solicit-serverid.pl
N src/external/bsd/dhcp/dist/tests/DHCPv6/020-advertise-mcast.pl
N 

CVS commit: src/external/bsd/dhcp/dist

2013-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 24 15:53:59 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/client: dhc6.c dhclient.c
src/external/bsd/dhcp/dist/common: conflex.c discover.c dispatch.c
dns.c ns_name.c
src/external/bsd/dhcp/dist/dst: base64.c
src/external/bsd/dhcp/dist/includes: dhcpd.h
src/external/bsd/dhcp/dist/omapip: dispatch.c
src/external/bsd/dhcp/dist/relay: dhcrelay.c
src/external/bsd/dhcp/dist/server: ddns.c dhcpleasequery.c dhcpv6.c
mdb6.c

Log Message:
minimal patches to compile with WARNS=1 !?!?


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/dhcp/dist/client/dhc6.c \
src/external/bsd/dhcp/dist/client/dhclient.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/dhcp/dist/common/conflex.c \
src/external/bsd/dhcp/dist/common/discover.c \
src/external/bsd/dhcp/dist/common/dispatch.c \
src/external/bsd/dhcp/dist/common/dns.c \
src/external/bsd/dhcp/dist/common/ns_name.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/dhcp/dist/dst/base64.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/dhcp/dist/includes/dhcpd.h
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/dhcp/dist/omapip/dispatch.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/dhcp/dist/relay/dhcrelay.c
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/dhcp/dist/server/ddns.c \
src/external/bsd/dhcp/dist/server/dhcpleasequery.c \
src/external/bsd/dhcp/dist/server/dhcpv6.c \
src/external/bsd/dhcp/dist/server/mdb6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/client/dhc6.c
diff -u src/external/bsd/dhcp/dist/client/dhc6.c:1.1.1.1 src/external/bsd/dhcp/dist/client/dhc6.c:1.2
--- src/external/bsd/dhcp/dist/client/dhc6.c:1.1.1.1	Sun Mar 24 11:45:59 2013
+++ src/external/bsd/dhcp/dist/client/dhc6.c	Sun Mar 24 11:53:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhc6.c,v 1.1.1.1 2013/03/24 15:45:59 christos Exp $	*/
+/*	$NetBSD: dhc6.c,v 1.2 2013/03/24 15:53:58 christos Exp $	*/
 
 /* dhc6.c - DHCPv6 client routines. */
 
@@ -4790,7 +4790,7 @@ unconfigure6(struct client_state *client
 	}
 }
 
-void
+static void
 refresh_info_request6(void *input)
 {
 	struct client_state *client;
Index: src/external/bsd/dhcp/dist/client/dhclient.c
diff -u src/external/bsd/dhcp/dist/client/dhclient.c:1.1.1.1 src/external/bsd/dhcp/dist/client/dhclient.c:1.2
--- src/external/bsd/dhcp/dist/client/dhclient.c:1.1.1.1	Sun Mar 24 11:45:58 2013
+++ src/external/bsd/dhcp/dist/client/dhclient.c	Sun Mar 24 11:53:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dhclient.c,v 1.1.1.1 2013/03/24 15:45:58 christos Exp $	*/
+/*	$NetBSD: dhclient.c,v 1.2 2013/03/24 15:53:58 christos Exp $	*/
 
 /* dhclient.c
 
@@ -3696,7 +3696,7 @@ static void shutdown_exit (void *foo)
  */
 
 /* The first and second stages are pretty similar so we combine them */
-void
+static void
 client_dns_remove_action(dhcp_ddns_cb_t *ddns_cb,
 			 isc_result_teresult)
 {
@@ -3863,7 +3863,7 @@ client_dns_update_timeout (void *cp)
  */
 
 /* The first and second stages are pretty similar so we combine them */
-void
+static void
 client_dns_update_action(dhcp_ddns_cb_t *ddns_cb,
 			 isc_result_teresult)
 {

Index: src/external/bsd/dhcp/dist/common/conflex.c
diff -u src/external/bsd/dhcp/dist/common/conflex.c:1.1.1.1 src/external/bsd/dhcp/dist/common/conflex.c:1.2
--- src/external/bsd/dhcp/dist/common/conflex.c:1.1.1.1	Sun Mar 24 11:45:52 2013
+++ src/external/bsd/dhcp/dist/common/conflex.c	Sun Mar 24 11:53:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: conflex.c,v 1.1.1.1 2013/03/24 15:45:52 christos Exp $	*/
+/*	$NetBSD: conflex.c,v 1.2 2013/03/24 15:53:58 christos Exp $	*/
 
 /* conflex.c
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: conflex.c,v 1.1.1.1 2013/03/24 15:45:52 christos Exp $);
+__RCSID($NetBSD: conflex.c,v 1.2 2013/03/24 15:53:58 christos Exp $);
 
 #include dhcpd.h
 #include ctype.h
@@ -388,7 +388,7 @@ next_raw_token(const char **rval, unsign
  * warning in the GENERAL NOTES ABOUT TOKENS above though.)
  */
 
-enum dhcp_token
+static enum dhcp_token
 do_peek_token(const char **rval, unsigned int *rlen,
 	  struct parse *cfile, isc_boolean_t raw) {
 	int x;
Index: src/external/bsd/dhcp/dist/common/discover.c
diff -u src/external/bsd/dhcp/dist/common/discover.c:1.1.1.1 src/external/bsd/dhcp/dist/common/discover.c:1.2
--- src/external/bsd/dhcp/dist/common/discover.c:1.1.1.1	Sun Mar 24 11:45:52 2013
+++ src/external/bsd/dhcp/dist/common/discover.c	Sun Mar 24 11:53:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: discover.c,v 1.1.1.1 2013/03/24 15:45:52 christos Exp $	*/
+/*	$NetBSD: discover.c,v 1.2 2013/03/24 15:53:58 christos Exp $	*/
 
 /* discover.c
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: discover.c,v 1.1.1.1 2013/03/24 15:45:52 christos Exp $);
+__RCSID($NetBSD: discover.c,v 1.2 2013/03/24 

CVS commit: src/external/bsd/dhcp

2013-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 24 15:54:32 UTC 2013

Added Files:
src/external/bsd/dhcp: Makefile Makefile.inc dhcp2netbsd
src/external/bsd/dhcp/bin: Makefile Makefile.inc
src/external/bsd/dhcp/bin/client: Makefile
src/external/bsd/dhcp/bin/clientscript: Makefile dhclient-script
src/external/bsd/dhcp/bin/omshell: Makefile
src/external/bsd/dhcp/bin/relay: Makefile
src/external/bsd/dhcp/bin/server: Makefile
src/external/bsd/dhcp/include: config.h
src/external/bsd/dhcp/lib: Makefile Makefile.inc
src/external/bsd/dhcp/lib/common: Makefile
src/external/bsd/dhcp/lib/dhcpctl: Makefile
src/external/bsd/dhcp/lib/dst: Makefile
src/external/bsd/dhcp/lib/omapip: Makefile
src/external/bsd/dhcp/share: Makefile
src/external/bsd/dhcp/share/dhcpd: Makefile pxe.defs

Log Message:
Build gluons
NB: This will not link yet, until I commit all the bind changes.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/Makefile \
src/external/bsd/dhcp/Makefile.inc src/external/bsd/dhcp/dhcp2netbsd
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/bin/Makefile \
src/external/bsd/dhcp/bin/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/bin/client/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/bin/clientscript/Makefile \
src/external/bsd/dhcp/bin/clientscript/dhclient-script
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/bin/omshell/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/bin/relay/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/bin/server/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/include/config.h
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/lib/Makefile \
src/external/bsd/dhcp/lib/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/lib/common/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/lib/dhcpctl/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/lib/dst/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/lib/omapip/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/share/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/dhcp/share/dhcpd/Makefile \
src/external/bsd/dhcp/share/dhcpd/pxe.defs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/dhcp/Makefile
diff -u /dev/null src/external/bsd/dhcp/Makefile:1.1
--- /dev/null	Sun Mar 24 11:54:32 2013
+++ src/external/bsd/dhcp/Makefile	Sun Mar 24 11:54:29 2013
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2013/03/24 15:54:29 christos Exp $
+
+SUBDIR=	lib share .WAIT bin
+
+.include bsd.subdir.mk
Index: src/external/bsd/dhcp/Makefile.inc
diff -u /dev/null src/external/bsd/dhcp/Makefile.inc:1.1
--- /dev/null	Sun Mar 24 11:54:32 2013
+++ src/external/bsd/dhcp/Makefile.inc	Sun Mar 24 11:54:29 2013
@@ -0,0 +1,39 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/03/24 15:54:29 christos Exp $
+
+WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
+
+.include bsd.own.mk
+
+USE_FORT?= yes	# network client/server
+CWARNFLAGS.clang+=	-Wno-tautological-compare \
+			-Wno-conversion -Wno-constant-logical-operand \
+			-Wno-format-security
+
+DIST:=	${.PARSEDIR}/dist
+BIND:=	${.PARSEDIR}/../bind/dist
+.PATH:	${DIST}/${DHCPSRCDIR}
+
+COBJDIR!=cd ${.PARSEDIR}/lib/common  ${PRINTOBJDIR}
+OMOBJDIR!=cd ${.PARSEDIR}/lib/omapip  ${PRINTOBJDIR}
+DSTOBJDIR!=cd ${.PARSEDIR}/lib/dst  ${PRINTOBJDIR}
+
+.if (${USE_INET6} != no)
+CPPFLAGS+=	-DDHCPv6
+.endif
+CPPFLAGS+= -DISC_PLATFORM_USETHREADS
+CPPFLAGS+= -I${DIST} -I${DIST}/includes -I${DIST}/../include
+CPPFLAGS+= -I${BIND} -I${BIND}/includes -I${BIND}/../include
+.for dir in isc dns
+CPPFLAGS+= -I${BIND}/lib/${dir}/include
+CPPFLAGS+= -I${BIND}/lib/${dir}/unix/include
+CPPFLAGS+= -I${BIND}/lib/${dir}/pthreads/include
+.endfor
+CPPFLAGS+= -DLOCALSTATEDIR='/var'
+LDADD+= ${COBJDIR}/libdhcp.a
+LDADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
+LDADD+= -ldns -lisc
+LDADD+= -lipsec
+DPADD+= ${COBJDIR}/libdhcp.a
+DPADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
+DPADD+=	${LIBDNS} ${LIBISC}
+DPADD+= ${LIBIPSEC}
Index: src/external/bsd/dhcp/dhcp2netbsd
diff -u /dev/null src/external/bsd/dhcp/dhcp2netbsd:1.1
--- /dev/null	Sun Mar 24 11:54:32 2013
+++ src/external/bsd/dhcp/dhcp2netbsd	Sun Mar 24 11:54:29 2013
@@ -0,0 +1,82 @@
+#! /bin/sh
+#
+#	$NetBSD: dhcp2netbsd,v 1.1 2013/03/24 15:54:29 christos Exp $
+#
+# Copyright (c) 2003, 2011 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the

CVS commit: src/external/bsd/dhcp/dist/dst

2013-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 24 16:27:58 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/dst: base64.c

Log Message:
remove error(1) comment


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcp/dist/dst/base64.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/dst/base64.c
diff -u src/external/bsd/dhcp/dist/dst/base64.c:1.2 src/external/bsd/dhcp/dist/dst/base64.c:1.3
--- src/external/bsd/dhcp/dist/dst/base64.c:1.2	Sun Mar 24 11:53:58 2013
+++ src/external/bsd/dhcp/dist/dst/base64.c	Sun Mar 24 12:27:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: base64.c,v 1.2 2013/03/24 15:53:58 christos Exp $	*/
+/*	$NetBSD: base64.c,v 1.3 2013/03/24 16:27:58 christos Exp $	*/
 
 /*
  * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. (ISC)
@@ -207,7 +207,6 @@ b64_ntop(u_char const *src, size_t srcle
  */
 
 int
-/*###207 [cc] error: no previous prototype for 'b64_pton'%%%*/
 b64_pton(char const *src, u_char *target, size_t targsize)
 {
 	int tarindex, state, ch;



CVS commit: src/external/bsd/dhcp

2013-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 24 22:21:22 UTC 2013

Modified Files:
src/external/bsd/dhcp: Makefile.inc

Log Message:
Add a build kludge to make dhclient link statically libisc, libdns, libpthread
so it does not need things from /usr/lib, until we decide what to do with it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/dhcp/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/Makefile.inc
diff -u src/external/bsd/dhcp/Makefile.inc:1.1 src/external/bsd/dhcp/Makefile.inc:1.2
--- src/external/bsd/dhcp/Makefile.inc:1.1	Sun Mar 24 11:54:29 2013
+++ src/external/bsd/dhcp/Makefile.inc	Sun Mar 24 18:21:21 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.1 2013/03/24 15:54:29 christos Exp $
+# $NetBSD: Makefile.inc,v 1.2 2013/03/24 22:21:21 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -31,9 +31,17 @@ CPPFLAGS+= -I${BIND}/lib/${dir}/pthreads
 CPPFLAGS+= -DLOCALSTATEDIR='/var'
 LDADD+= ${COBJDIR}/libdhcp.a
 LDADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
+.if defined(PROG)  ${PROG} == dhclient
+LDADD+=--static
+.endif
 LDADD+= -ldns -lisc
-LDADD+= -lipsec
+LDADD+=-lpthread
+.if defined(PROG)  ${PROG} == dhclient
+LDADD+=--dynamic
+.endif
+LDADD+= -lcrypto -lipsec
 DPADD+= ${COBJDIR}/libdhcp.a
 DPADD+= ${OMOBJDIR}/libomapi.a ${DSTOBJDIR}/libdst.a
 DPADD+=	${LIBDNS} ${LIBISC}
-DPADD+= ${LIBIPSEC}
+DPADD+= ${LIBCRYPTO} ${LIBIPSEC}
+DPADD+= ${LIBPTHREAD}



CVS commit: src/external/bsd/dhcp/dist

2013-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 24 22:50:50 UTC 2013

Update of /cvsroot/src/external/bsd/dhcp/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv13098

Log Message:
updat to 4.2.5

Status:

Vendor Tag: ISC
Release Tags:   DHCP4_2_5

U src/external/bsd/dhcp/dist/aclocal.m4
U src/external/bsd/dhcp/dist/configure
U src/external/bsd/dhcp/dist/configure.ac
U src/external/bsd/dhcp/dist/depcomp
U src/external/bsd/dhcp/dist/install-sh
U src/external/bsd/dhcp/dist/LICENSE
U src/external/bsd/dhcp/dist/Makefile.am
U src/external/bsd/dhcp/dist/Makefile.in
U src/external/bsd/dhcp/dist/missing
U src/external/bsd/dhcp/dist/README
U src/external/bsd/dhcp/dist/RELNOTES
U src/external/bsd/dhcp/dist/doc/api+protocol
U src/external/bsd/dhcp/dist/doc/IANA-arp-parameters
U src/external/bsd/dhcp/dist/doc/References.html
U src/external/bsd/dhcp/dist/doc/Makefile
U src/external/bsd/dhcp/dist/doc/References.xml
U src/external/bsd/dhcp/dist/doc/References.txt
N src/external/bsd/dhcp/dist/doc/devel/doxyfile.in
U src/external/bsd/dhcp/dist/doc/examples/dhclient-dhcpv6.conf
U src/external/bsd/dhcp/dist/doc/examples/dhcpd-dhcpv6.conf
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient-script.8
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient.8
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient.conf.5
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhclient.leases.5
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhcp-eval.5
U src/external/bsd/dhcp/dist/doc/ja_JP.eucJP/dhcp-options.5
U src/external/bsd/dhcp/dist/client/dhclient-script.8
U src/external/bsd/dhcp/dist/client/clparse.c
C src/external/bsd/dhcp/dist/client/dhc6.c
U src/external/bsd/dhcp/dist/client/dhclient.conf.5
U src/external/bsd/dhcp/dist/client/dhclient.8
C src/external/bsd/dhcp/dist/client/dhclient.c
N src/external/bsd/dhcp/dist/client/dhclient.conf.example
U src/external/bsd/dhcp/dist/client/dhclient.leases.5
U src/external/bsd/dhcp/dist/client/Makefile.am
U src/external/bsd/dhcp/dist/client/Makefile.in
U src/external/bsd/dhcp/dist/client/scripts/freebsd
U src/external/bsd/dhcp/dist/client/scripts/bsdos
U src/external/bsd/dhcp/dist/client/scripts/macos
U src/external/bsd/dhcp/dist/client/scripts/linux
U src/external/bsd/dhcp/dist/client/scripts/netbsd
U src/external/bsd/dhcp/dist/client/scripts/nextstep
U src/external/bsd/dhcp/dist/client/scripts/openbsd
U src/external/bsd/dhcp/dist/client/scripts/openwrt
U src/external/bsd/dhcp/dist/client/scripts/solaris
C src/external/bsd/dhcp/dist/common/conflex.c
U src/external/bsd/dhcp/dist/common/alloc.c
U src/external/bsd/dhcp/dist/common/bpf.c
U src/external/bsd/dhcp/dist/common/comapi.c
U src/external/bsd/dhcp/dist/common/dhcp-eval.5
U src/external/bsd/dhcp/dist/common/ctrace.c
U src/external/bsd/dhcp/dist/common/parse.c
U src/external/bsd/dhcp/dist/common/dhcp-options.5
U src/external/bsd/dhcp/dist/common/discover.c
U src/external/bsd/dhcp/dist/common/dispatch.c
U src/external/bsd/dhcp/dist/common/dlpi.c
C src/external/bsd/dhcp/dist/common/dns.c
U src/external/bsd/dhcp/dist/common/ethernet.c
U src/external/bsd/dhcp/dist/common/execute.c
U src/external/bsd/dhcp/dist/common/fddi.c
U src/external/bsd/dhcp/dist/common/icmp.c
U src/external/bsd/dhcp/dist/common/inet.c
U src/external/bsd/dhcp/dist/common/lpf.c
U src/external/bsd/dhcp/dist/common/Makefile.am
U src/external/bsd/dhcp/dist/common/Makefile.in
U src/external/bsd/dhcp/dist/common/memory.c
U src/external/bsd/dhcp/dist/common/nit.c
C src/external/bsd/dhcp/dist/common/ns_name.c
U src/external/bsd/dhcp/dist/common/options.c
U src/external/bsd/dhcp/dist/common/packet.c
U src/external/bsd/dhcp/dist/common/print.c
U src/external/bsd/dhcp/dist/common/raw.c
U src/external/bsd/dhcp/dist/common/resolv.c
U src/external/bsd/dhcp/dist/common/socket.c
U src/external/bsd/dhcp/dist/common/tables.c
U src/external/bsd/dhcp/dist/common/tree.c
U src/external/bsd/dhcp/dist/common/tr.c
U src/external/bsd/dhcp/dist/common/upf.c
U src/external/bsd/dhcp/dist/common/tests/Makefile.am
N src/external/bsd/dhcp/dist/common/tests/Atffile
U src/external/bsd/dhcp/dist/common/tests/test_alloc.c
U src/external/bsd/dhcp/dist/common/tests/Makefile.in
U src/external/bsd/dhcp/dist/contrib/dhclient-tz-exithook.sh
U src/external/bsd/dhcp/dist/contrib/3.0b1-lease-convert
U src/external/bsd/dhcp/dist/contrib/dhcp.spec
U src/external/bsd/dhcp/dist/contrib/sethostname.sh
U src/external/bsd/dhcp/dist/contrib/solaris.init
U src/external/bsd/dhcp/dist/contrib/ldap/dhcpd-conf-to-ldap
U src/external/bsd/dhcp/dist/contrib/ldap/dhcp.schema
U src/external/bsd/dhcp/dist/contrib/ldap/README.ldap
U src/external/bsd/dhcp/dist/contrib/ms2isc/ms2isc.pl
U src/external/bsd/dhcp/dist/contrib/ms2isc/readme.txt
U src/external/bsd/dhcp/dist/contrib/ms2isc/Registry.pm
U src/external/bsd/dhcp/dist/dst/dst_api.c
C src/external/bsd/dhcp/dist/dst/base64.c
U src/external/bsd/dhcp/dist/dst/dst_support.c
U src/external/bsd/dhcp/dist/dst/dst_internal.h
U 

CVS commit: src/external/bsd/dhcp

2013-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 25 01:11:03 UTC 2013

Modified Files:
src/external/bsd/dhcp/dist/common: icmp.c
src/external/bsd/dhcp/include: config.h

Log Message:
Undo horrid configure hack, use compiler define.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/dhcp/dist/common/icmp.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcp/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcp/dist/common/icmp.c
diff -u src/external/bsd/dhcp/dist/common/icmp.c:1.1.1.1 src/external/bsd/dhcp/dist/common/icmp.c:1.2
--- src/external/bsd/dhcp/dist/common/icmp.c:1.1.1.1	Sun Mar 24 11:45:53 2013
+++ src/external/bsd/dhcp/dist/common/icmp.c	Sun Mar 24 21:11:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp.c,v 1.1.1.1 2013/03/24 15:45:53 christos Exp $	*/
+/*	$NetBSD: icmp.c,v 1.2 2013/03/25 01:11:02 christos Exp $	*/
 
 /* dhcp.c
 
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: icmp.c,v 1.1.1.1 2013/03/24 15:45:53 christos Exp $);
+__RCSID($NetBSD: icmp.c,v 1.2 2013/03/25 01:11:02 christos Exp $);
 
 #include dhcpd.h
 #include netinet/ip.h
@@ -164,7 +164,7 @@ int icmp_echorequest (addr)
 	icmp.icmp_code = 0;
 	icmp.icmp_cksum = 0;
 	icmp.icmp_seq = 0;
-#if SIZEOF_STRUCT_IADDR_P == 8
+#ifdef _LP64
 	icmp.icmp_id = (((u_int32_t)(u_int64_t)addr) ^
   			(u_int32_t)(((u_int64_t)addr)  32));
 #else

Index: src/external/bsd/dhcp/include/config.h
diff -u src/external/bsd/dhcp/include/config.h:1.2 src/external/bsd/dhcp/include/config.h:1.3
--- src/external/bsd/dhcp/include/config.h:1.2	Sun Mar 24 19:03:07 2013
+++ src/external/bsd/dhcp/include/config.h	Sun Mar 24 21:11:03 2013
@@ -136,7 +136,7 @@
 /* #undef SECS_BYTEORDER */
 
 /* The size of `struct iaddr *', as computed by sizeof. */
-#define SIZEOF_STRUCT_IADDR_P 8
+/* #undef SIZEOF_STRUCT_IADDR_P */
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1