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

2024-02-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 28 18:14:43 UTC 2024

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

Log Message:
fix the version number.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/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/mpl/dhcp/include/config.h
diff -u src/external/mpl/dhcp/include/config.h:1.3 src/external/mpl/dhcp/include/config.h:1.4
--- src/external/mpl/dhcp/include/config.h:1.3	Mon Aug  3 17:10:57 2020
+++ src/external/mpl/dhcp/include/config.h	Wed Feb 28 13:14:43 2024
@@ -5,13 +5,16 @@
 /* #undef AC_APPLE_UNIVERSAL_BUILD */
 
 /* Define to support binary insertion of leases into queues. */
-#define DELAYED_ACK 1
+/* #undef BINARY_LEASES */
 
 /* Define to compile debug-only DHCP software. */
 /* #undef DEBUG */
 
 /* Define to queue multiple DHCPACK replies per fsync. */
-/* #undef DELAYED_ACK */
+#define DELAYED_ACK 1
+
+/* Define to 1 to include DHCPv4 over DHCPv6 support. */
+/* #undef DHCP4o6 */
 
 /* Define to BIG_ENDIAN for MSB (Motorola or SPARC CPUs) or LITTLE_ENDIAN for
LSB (Intel CPUs). */
@@ -96,6 +99,9 @@
 /* Define to 1 if you have the  header file. */
 #define HAVE_STDINT_H 1
 
+/* Define to 1 if you have the  header file. */
+#define HAVE_STDIO_H 1
+
 /* Define to 1 if you have the  header file. */
 #define HAVE_STDLIB_H 1
 
@@ -145,7 +151,7 @@
 #define PACKAGE_NAME "DHCP"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "DHCP 4.4.2"
+#define PACKAGE_STRING "DHCP 4.4.3-P1"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "dhcp"
@@ -154,7 +160,7 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "4.4.2"
+#define PACKAGE_VERSION "4.4.3-P1"
 
 /* Define to any value to include Ari's PARANOIA patch. */
 /* #undef PARANOIA */
@@ -206,7 +212,7 @@
 /* #undef USE_V4_PKTINFO */
 
 /* Version number of package */
-#define VERSION "4.3.3"
+#define VERSION "4.4.3-P1"
 
 /* tpacket_auxdata.tp_vlan_tci present */
 /* #undef VLAN_TCI_PRESENT */



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

2024-02-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 28 18:14:43 UTC 2024

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

Log Message:
fix the version number.


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

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



CVS commit: src/external/mpl/dhcp

2024-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb 19 20:39:13 UTC 2024

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

Log Message:
fix static build


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/mpl/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/mpl/dhcp/Makefile.inc
diff -u src/external/mpl/dhcp/Makefile.inc:1.12 src/external/mpl/dhcp/Makefile.inc:1.13
--- src/external/mpl/dhcp/Makefile.inc:1.12	Sun Feb 18 15:57:30 2024
+++ src/external/mpl/dhcp/Makefile.inc	Mon Feb 19 15:39:13 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.12 2024/02/18 20:57:30 christos Exp $
+# $NetBSD: Makefile.inc,v 1.13 2024/02/19 20:39:13 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -14,9 +14,6 @@ BIND:=	${.PARSEDIR}/bind
 BINDDIST=	${BIND}/dist
 .PATH:	${DIST}/${DHCPSRCDIR}
 
-COBJDIR!=cd ${.PARSEDIR}/lib/common && ${PRINTOBJDIR}
-OMOBJDIR!=cd ${.PARSEDIR}/lib/omapip && ${PRINTOBJDIR}
-
 .if (${USE_INET6} != "no")
 CPPFLAGS+=	-DDHCPv6
 .endif
@@ -29,8 +26,6 @@ CPPFLAGS+= -I${BINDDIST}/lib/${dir}/unix
 CPPFLAGS+= -I${BINDDIST}/lib/${dir}/pthreads/include
 .endfor
 CPPFLAGS+= -DLOCALSTATEDIR='"/var"'
-LDADD+= ${COBJDIR}/libdhcp.a
-LDADD+= ${OMOBJDIR}/libomapi.a
 .if defined(PROG) && ${PROG} == "dhclient" && ${MKSANITIZER:Uno} != "yes"
 # We link the libraries that are in /usr/lib and not in /lib statically
 # because dhclient is in /sbin and is needed before /usr is mounted in
@@ -38,26 +33,28 @@ LDADD+= ${OMOBJDIR}/libomapi.a
 # would be to install the libraries in /lib...
 LDADD+=-Wl,-Bstatic
 .endif
+PROGDPLIBS+= dhcp ${DIST}/../lib/common
+PROGDPLIBS+= omapi ${DIST}/../lib/omapip
 PROGDPLIBS+= irs ${BIND}/lib/libirs
 PROGDPLIBS+= isccfg ${BIND}/lib/libisccfg
 PROGDPLIBS+= dns ${BIND}/lib/libdns
 PROGDPLIBS+= isc ${BIND}/lib/libisc
 PROGDPLIBS+= uv ${NETBSDSRCDIR}/external/mit/libuv/lib
-LDADD+= -lexecinfo -lkvm -lpthread -lz
-DPADD+= ${LIBEXECINFO} ${LIBKVM} ${LIBPTHREAD} ${LIBZ}
+PROGDPLIBS+= execinfo ${NETBSDSRCDIR}/lib/libexecinfo
+PROGDPLIBS+= kvm ${NETBSDSRCDIR}/lib/libkvm
+PROGDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
+PROGDPLIBS+= z ${NETBSDSRCDIR}/lib/libz
 .if (${MKKERBEROS} != "no")
-LDADD+= -lgssapi -lheimntlm ${LIBKRB5_LDADD} ${LIBKRB5_STATIC_LDADD}
-DPADD+= ${LIBKRB5_DPADD} ${LIBHEIMNTLM} ${LIBGSSAPI} ${LIBKRB5_STATIC_DPADD}
+LDADD_AFTER+= -lgssapi -lheimntlm ${LIBKRB5_LDADD} ${LIBKRB5_STATIC_LDADD}
+DPADD_AFTER+= ${LIBKRB5_DPADD} ${LIBHEIMNTLM} ${LIBGSSAPI} ${LIBKRB5_STATIC_DPADD}
 .endif
 .if defined(PROG) && ${PROG} == "dhclient" && ${MKSANITIZER:Uno} != "yes"
-LDADD+=-Wl,-Bdynamic
+LDADD_AFTER+=-Wl,-Bdynamic
 .endif
-LDADD+= -lssl -lcrypto -lipsec -lcrypt
-DPADD+= ${LIBSSL} ${LIBCRYPTO} ${LIBIPSEC} ${LIBCRYPT}
+LDADD_AFTER+= -lssl -lcrypto -lipsec -lcrypt
+DPADD_AFTER+= ${LIBSSL} ${LIBCRYPTO} ${LIBIPSEC} ${LIBCRYPT}
 .if defined(PROG) && ${PROG} == "dhclient" && ${MKSANITIZER:Uno} != "yes"
-LDADD+=-Wl,-Bdynamic
+LDADD_AFTER+=-Wl,-Bdynamic
 .endif
-DPADD+= ${COBJDIR}/libdhcp.a
-DPADD+= ${OMOBJDIR}/libomapi.a
 
 COPTS+=	-fcommon



CVS commit: src/external/mpl/dhcp

2024-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb 19 20:39:13 UTC 2024

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

Log Message:
fix static build


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

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



CVS commit: src/external/mpl/dhcp

2024-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 18 20:58:01 UTC 2024

Modified Files:
src/external/mpl/dhcp: Makefile Makefile.inc
Added Files:
src/external/mpl/dhcp/bind: Makefile Makefile.inc
src/external/mpl/dhcp/bind/dist: version
src/external/mpl/dhcp/bind/dist/lib/dns: Kyuafile Makefile.in acl.c
adb.c badcache.c byaddr.c cache.c callbacks.c catz.c client.c
clientinfo.c compress.c db.c dbiterator.c dbtable.c diff.c
dispatch.c dlz.c dns64.c dnsrps.c dnssec.c dnstap.c dnstap.proto
ds.c dst_api.c dst_internal.h dst_openssl.h dst_parse.c dst_parse.h
dst_pkcs11.h dst_result.c dyndb.c ecdb.c ecs.c fixedname.c
forward.c gen-unix.h gen-win32.h gen.c geoip2.c gssapi_link.c
gssapictx.c hmac_link.c ipkeylist.c iptable.c journal.c kasp.c
key.c keydata.c keymgr.c keytable.c lib.c log.c lookup.c mapapi
master.c masterdump.c message.c name.c ncache.c nsec.c nsec3.c
nta.c openssl_link.c openssldh_link.c opensslecdsa_link.c
openssleddsa_link.c opensslrsa_link.c order.c peer.c pkcs11.c
pkcs11ecdsa_link.c pkcs11eddsa_link.c pkcs11rsa_link.c portlist.c
private.c rbt.c rbtdb.c rbtdb.h rcode.c rdata.c rdatalist.c
rdatalist_p.h rdataset.c rdatasetiter.c rdataslab.c request.c
resolver.c result.c rootns.c rpz.c rriterator.c rrl.c sdb.c sdlz.c
soa.c ssu.c ssu_external.c stats.c tcpmsg.c time.c timer.c tkey.c
tsec.c tsig.c tsig_p.h ttl.c update.c validator.c version.c view.c
xfrin.c zone.c zone_p.h zonekey.c zoneverify.c zt.c
src/external/mpl/dhcp/bind/dist/lib/dns/include: Makefile.in
src/external/mpl/dhcp/bind/dist/lib/dns/include/dns: Makefile.in acl.h
adb.h badcache.h bit.h byaddr.h cache.h callbacks.h catz.h cert.h
client.h clientinfo.h compress.h db.h dbiterator.h dbtable.h diff.h
dispatch.h dlz.h dlz_dlopen.h dns64.h dnsrps.h dnssec.h dnstap.h
ds.h dsdigest.h dyndb.h ecdb.h ecs.h edns.h events.h fixedname.h
forward.h geoip.h ipkeylist.h iptable.h journal.h kasp.h keydata.h
keyflags.h keymgr.h keytable.h keyvalues.h lib.h librpz.h lmdb.h
log.h lookup.h master.h masterdump.h message.h name.h ncache.h
nsec.h nsec3.h nta.h opcode.h order.h peer.h portlist.h private.h
rbt.h rcode.h rdata.h rdataclass.h rdatalist.h rdataset.h
rdatasetiter.h rdataslab.h rdatatype.h request.h resolver.h
result.h rootns.h rpz.h rriterator.h rrl.h sdb.h sdlz.h secalg.h
secproto.h soa.h ssu.h stats.h tcpmsg.h time.h timer.h tkey.h
tsec.h tsig.h ttl.h types.h update.h validator.h version.h view.h
xfrin.h zone.h zonekey.h zoneverify.h zt.h
src/external/mpl/dhcp/bind/dist/lib/dns/include/dst: Makefile.in dst.h
gssapi.h result.h
src/external/mpl/dhcp/bind/dist/lib/dns/rdata: rdatastructpre.h
rdatastructsuf.h
src/external/mpl/dhcp/bind/dist/lib/dns/rdata/any_255: tsig_250.c
tsig_250.h
src/external/mpl/dhcp/bind/dist/lib/dns/rdata/ch_3: a_1.c a_1.h
src/external/mpl/dhcp/bind/dist/lib/dns/rdata/generic: afsdb_18.c
afsdb_18.h amtrelay_260.c amtrelay_260.h avc_258.c avc_258.h
caa_257.c caa_257.h cdnskey_60.c cdnskey_60.h cds_59.c cds_59.h
cert_37.c cert_37.h cname_5.c cname_5.h csync_62.c csync_62.h
dlv_32769.c dlv_32769.h dname_39.c dname_39.h dnskey_48.c
dnskey_48.h doa_259.c doa_259.h ds_43.c ds_43.h eui48_108.c
eui48_108.h eui64_109.c eui64_109.h gpos_27.c gpos_27.h hinfo_13.c
hinfo_13.h hip_55.c hip_55.h ipseckey_45.c ipseckey_45.h isdn_20.c
isdn_20.h key_25.c key_25.h keydata_65533.c keydata_65533.h
l32_105.c l32_105.h l64_106.c l64_106.h loc_29.c loc_29.h lp_107.c
lp_107.h mb_7.c mb_7.h md_3.c md_3.h mf_4.c mf_4.h mg_8.c mg_8.h
minfo_14.c minfo_14.h mr_9.c mr_9.h mx_15.c mx_15.h naptr_35.c
naptr_35.h nid_104.c nid_104.h ninfo_56.c ninfo_56.h ns_2.c ns_2.h
nsec3_50.c nsec3_50.h nsec3param_51.c nsec3param_51.h nsec_47.c
nsec_47.h null_10.c null_10.h nxt_30.c nxt_30.h openpgpkey_61.c
openpgpkey_61.h opt_41.c opt_41.h proforma.c proforma.h ptr_12.c
ptr_12.h rkey_57.c rkey_57.h rp_17.c rp_17.h rrsig_46.c rrsig_46.h
rt_21.c rt_21.h sig_24.c sig_24.h sink_40.c sink_40.h smimea_53.c
smimea_53.h soa_6.c soa_6.h spf_99.c spf_99.h sshfp_44.c sshfp_44.h
ta_32768.c ta_32768.h talink_58.c talink_58.h tkey_249.c tkey_249.h
tlsa_52.c tlsa_52.h txt_16.c txt_16.h uri_256.c uri_256.h x25_19.c
x25_19.h zonemd_63.c zonemd_63.h
src/external/mpl/dhcp/bind/dist/lib/dns/rdata/hs_4: a_1.c a_1.h
   

CVS commit: src/external/mpl/dhcp

2024-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 18 20:58:01 UTC 2024

Modified Files:
src/external/mpl/dhcp: Makefile Makefile.inc
Added Files:
src/external/mpl/dhcp/bind: Makefile Makefile.inc
src/external/mpl/dhcp/bind/dist: version
src/external/mpl/dhcp/bind/dist/lib/dns: Kyuafile Makefile.in acl.c
adb.c badcache.c byaddr.c cache.c callbacks.c catz.c client.c
clientinfo.c compress.c db.c dbiterator.c dbtable.c diff.c
dispatch.c dlz.c dns64.c dnsrps.c dnssec.c dnstap.c dnstap.proto
ds.c dst_api.c dst_internal.h dst_openssl.h dst_parse.c dst_parse.h
dst_pkcs11.h dst_result.c dyndb.c ecdb.c ecs.c fixedname.c
forward.c gen-unix.h gen-win32.h gen.c geoip2.c gssapi_link.c
gssapictx.c hmac_link.c ipkeylist.c iptable.c journal.c kasp.c
key.c keydata.c keymgr.c keytable.c lib.c log.c lookup.c mapapi
master.c masterdump.c message.c name.c ncache.c nsec.c nsec3.c
nta.c openssl_link.c openssldh_link.c opensslecdsa_link.c
openssleddsa_link.c opensslrsa_link.c order.c peer.c pkcs11.c
pkcs11ecdsa_link.c pkcs11eddsa_link.c pkcs11rsa_link.c portlist.c
private.c rbt.c rbtdb.c rbtdb.h rcode.c rdata.c rdatalist.c
rdatalist_p.h rdataset.c rdatasetiter.c rdataslab.c request.c
resolver.c result.c rootns.c rpz.c rriterator.c rrl.c sdb.c sdlz.c
soa.c ssu.c ssu_external.c stats.c tcpmsg.c time.c timer.c tkey.c
tsec.c tsig.c tsig_p.h ttl.c update.c validator.c version.c view.c
xfrin.c zone.c zone_p.h zonekey.c zoneverify.c zt.c
src/external/mpl/dhcp/bind/dist/lib/dns/include: Makefile.in
src/external/mpl/dhcp/bind/dist/lib/dns/include/dns: Makefile.in acl.h
adb.h badcache.h bit.h byaddr.h cache.h callbacks.h catz.h cert.h
client.h clientinfo.h compress.h db.h dbiterator.h dbtable.h diff.h
dispatch.h dlz.h dlz_dlopen.h dns64.h dnsrps.h dnssec.h dnstap.h
ds.h dsdigest.h dyndb.h ecdb.h ecs.h edns.h events.h fixedname.h
forward.h geoip.h ipkeylist.h iptable.h journal.h kasp.h keydata.h
keyflags.h keymgr.h keytable.h keyvalues.h lib.h librpz.h lmdb.h
log.h lookup.h master.h masterdump.h message.h name.h ncache.h
nsec.h nsec3.h nta.h opcode.h order.h peer.h portlist.h private.h
rbt.h rcode.h rdata.h rdataclass.h rdatalist.h rdataset.h
rdatasetiter.h rdataslab.h rdatatype.h request.h resolver.h
result.h rootns.h rpz.h rriterator.h rrl.h sdb.h sdlz.h secalg.h
secproto.h soa.h ssu.h stats.h tcpmsg.h time.h timer.h tkey.h
tsec.h tsig.h ttl.h types.h update.h validator.h version.h view.h
xfrin.h zone.h zonekey.h zoneverify.h zt.h
src/external/mpl/dhcp/bind/dist/lib/dns/include/dst: Makefile.in dst.h
gssapi.h result.h
src/external/mpl/dhcp/bind/dist/lib/dns/rdata: rdatastructpre.h
rdatastructsuf.h
src/external/mpl/dhcp/bind/dist/lib/dns/rdata/any_255: tsig_250.c
tsig_250.h
src/external/mpl/dhcp/bind/dist/lib/dns/rdata/ch_3: a_1.c a_1.h
src/external/mpl/dhcp/bind/dist/lib/dns/rdata/generic: afsdb_18.c
afsdb_18.h amtrelay_260.c amtrelay_260.h avc_258.c avc_258.h
caa_257.c caa_257.h cdnskey_60.c cdnskey_60.h cds_59.c cds_59.h
cert_37.c cert_37.h cname_5.c cname_5.h csync_62.c csync_62.h
dlv_32769.c dlv_32769.h dname_39.c dname_39.h dnskey_48.c
dnskey_48.h doa_259.c doa_259.h ds_43.c ds_43.h eui48_108.c
eui48_108.h eui64_109.c eui64_109.h gpos_27.c gpos_27.h hinfo_13.c
hinfo_13.h hip_55.c hip_55.h ipseckey_45.c ipseckey_45.h isdn_20.c
isdn_20.h key_25.c key_25.h keydata_65533.c keydata_65533.h
l32_105.c l32_105.h l64_106.c l64_106.h loc_29.c loc_29.h lp_107.c
lp_107.h mb_7.c mb_7.h md_3.c md_3.h mf_4.c mf_4.h mg_8.c mg_8.h
minfo_14.c minfo_14.h mr_9.c mr_9.h mx_15.c mx_15.h naptr_35.c
naptr_35.h nid_104.c nid_104.h ninfo_56.c ninfo_56.h ns_2.c ns_2.h
nsec3_50.c nsec3_50.h nsec3param_51.c nsec3param_51.h nsec_47.c
nsec_47.h null_10.c null_10.h nxt_30.c nxt_30.h openpgpkey_61.c
openpgpkey_61.h opt_41.c opt_41.h proforma.c proforma.h ptr_12.c
ptr_12.h rkey_57.c rkey_57.h rp_17.c rp_17.h rrsig_46.c rrsig_46.h
rt_21.c rt_21.h sig_24.c sig_24.h sink_40.c sink_40.h smimea_53.c
smimea_53.h soa_6.c soa_6.h spf_99.c spf_99.h sshfp_44.c sshfp_44.h
ta_32768.c ta_32768.h talink_58.c talink_58.h tkey_249.c tkey_249.h
tlsa_52.c tlsa_52.h txt_16.c txt_16.h uri_256.c uri_256.h x25_19.c
x25_19.h zonemd_63.c zonemd_63.h
src/external/mpl/dhcp/bind/dist/lib/dns/rdata/hs_4: a_1.c a_1.h
   

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

2023-07-27 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Thu Jul 27 10:32:25 UTC 2023

Modified Files:
src/external/mpl/dhcp/dist/common: dispatch.c

Log Message:
dhcpd: move isc_event_free() before isc_timer_destroy() in timer cb

isc_timerevent_destroy() called by isc_event_free() expects to be able to
hold the timer lock, so must run before the timer is destroyed.
PR misc/57491.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/mpl/dhcp/dist/common/dispatch.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/mpl/dhcp/dist/common/dispatch.c
diff -u src/external/mpl/dhcp/dist/common/dispatch.c:1.4 src/external/mpl/dhcp/dist/common/dispatch.c:1.5
--- src/external/mpl/dhcp/dist/common/dispatch.c:1.4	Tue Jun 27 09:10:25 2023
+++ src/external/mpl/dhcp/dist/common/dispatch.c	Thu Jul 27 10:32:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: dispatch.c,v 1.4 2023/06/27 09:10:25 martin Exp $	*/
+/*	$NetBSD: dispatch.c,v 1.5 2023/07/27 10:32:25 tnn Exp $	*/
 
 /* dispatch.c
 
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: dispatch.c,v 1.4 2023/06/27 09:10:25 martin Exp $");
+__RCSID("$NetBSD: dispatch.c,v 1.5 2023/07/27 10:32:25 tnn Exp $");
 
 #include "dhcpd.h"
 
@@ -183,6 +183,7 @@ isclib_timer_callback(isc_task_t  *taskp
 			(*q->unref) (>what, MDL);
 		}
 		q->next = free_timeouts;
+		isc_event_free();
 		isc_timer_destroy(>isc_timeout);
 		free_timeouts = q;
 	} else {
@@ -192,9 +193,9 @@ isclib_timer_callback(isc_task_t  *taskp
 		 * don't try to - may change this to a log_fatal
 		 */
 		log_error("Error finding timer structure");
+		isc_event_free();
 	}
 
-	isc_event_free();
 	return;
 }
 



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

2023-07-27 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Thu Jul 27 10:32:25 UTC 2023

Modified Files:
src/external/mpl/dhcp/dist/common: dispatch.c

Log Message:
dhcpd: move isc_event_free() before isc_timer_destroy() in timer cb

isc_timerevent_destroy() called by isc_event_free() expects to be able to
hold the timer lock, so must run before the timer is destroyed.
PR misc/57491.


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

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



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

2023-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 27 09:10:25 UTC 2023

Modified Files:
src/external/mpl/dhcp/dist/common: dispatch.c

Log Message:
isc timer API changed with the recent bind import - use isc_timer_destroy()
instead of isc_timer_detach()


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/dist/common/dispatch.c

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



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

2023-06-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 27 09:10:25 UTC 2023

Modified Files:
src/external/mpl/dhcp/dist/common: dispatch.c

Log Message:
isc timer API changed with the recent bind import - use isc_timer_destroy()
instead of isc_timer_detach()


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/dist/common/dispatch.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/mpl/dhcp/dist/common/dispatch.c
diff -u src/external/mpl/dhcp/dist/common/dispatch.c:1.3 src/external/mpl/dhcp/dist/common/dispatch.c:1.4
--- src/external/mpl/dhcp/dist/common/dispatch.c:1.3	Sun Apr  3 01:10:58 2022
+++ src/external/mpl/dhcp/dist/common/dispatch.c	Tue Jun 27 09:10:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: dispatch.c,v 1.3 2022/04/03 01:10:58 christos Exp $	*/
+/*	$NetBSD: dispatch.c,v 1.4 2023/06/27 09:10:25 martin Exp $	*/
 
 /* dispatch.c
 
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: dispatch.c,v 1.3 2022/04/03 01:10:58 christos Exp $");
+__RCSID("$NetBSD: dispatch.c,v 1.4 2023/06/27 09:10:25 martin Exp $");
 
 #include "dhcpd.h"
 
@@ -183,7 +183,7 @@ isclib_timer_callback(isc_task_t  *taskp
 			(*q->unref) (>what, MDL);
 		}
 		q->next = free_timeouts;
-		isc_timer_detach(>isc_timeout);
+		isc_timer_destroy(>isc_timeout);
 		free_timeouts = q;
 	} else {
 		/*
@@ -409,7 +409,7 @@ void cancel_timeout (where, what)
 #if defined (TRACING)
 		if (!trace_playback()) {
 #endif
-			isc_timer_detach(>isc_timeout);
+			isc_timer_destroy(>isc_timeout);
 #if defined (TRACING)
 		}
 #endif
@@ -427,7 +427,7 @@ void cancel_all_timeouts ()
 	struct timeout *t, *n;
 	for (t = timeouts; t; t = n) {
 		n = t->next;
-		isc_timer_detach(>isc_timeout);
+		isc_timer_destroy(>isc_timeout);
 		if (t->unref && t->what)
 			(*t->unref) (>what, MDL);
 		t->next = free_timeouts;



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

2023-06-03 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jun  3 21:27:11 UTC 2023

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

Log Message:
dhcp: remove gcc 8 workaround

(if it's needed, add it back using ${CC_WNO_FORMAT_OVERFLOW})


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/mpl/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/mpl/dhcp/bin/server/Makefile
diff -u src/external/mpl/dhcp/bin/server/Makefile:1.8 src/external/mpl/dhcp/bin/server/Makefile:1.9
--- src/external/mpl/dhcp/bin/server/Makefile:1.8	Sat Jun  3 09:09:08 2023
+++ src/external/mpl/dhcp/bin/server/Makefile	Sat Jun  3 21:27:11 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2023/06/03 09:09:08 lukem Exp $
+# $NetBSD: Makefile,v 1.9 2023/06/03 21:27:11 lukem Exp $
 
 .include 
 
@@ -19,7 +19,6 @@ FILES=	dhcpd.conf
 COPTS.ddns.c +=-Wno-stringop-overflow
 .endif
 
-COPTS.mdb6.c +=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
 COPTS.omapi.c +=	-Wno-stack-protector
 COPTS.confpars.c+=	${CC_WNO_STRINGOP_TRUNCATION}
 COPTS.mdb6.c+=		${CC_WNO_STRINGOP_OVERFLOW}



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

2023-06-03 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sat Jun  3 21:27:11 UTC 2023

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

Log Message:
dhcp: remove gcc 8 workaround

(if it's needed, add it back using ${CC_WNO_FORMAT_OVERFLOW})


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/mpl/dhcp/bin/server/Makefile

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



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

2022-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct  5 22:20:15 UTC 2022

Modified Files:
src/external/mpl/dhcp/dist: RELNOTES
src/external/mpl/dhcp/dist/common: options.c
src/external/mpl/dhcp/dist/common/tests: option_unittest.c

Log Message:
Apply security fixes:
https://downloads.isc.org/isc/dhcp/4.4.3-P1/patches/CVE-2022-2928.4-4-3.diff
https://downloads.isc.org/isc/dhcp/4.4.3-P1/patches/CVE-2022-2929.4-4-3.diff


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/mpl/dhcp/dist/RELNOTES
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/dist/common/options.c
cvs rdiff -u -r1.4 -r1.5 \
src/external/mpl/dhcp/dist/common/tests/option_unittest.c

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



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

2022-10-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct  5 22:20:15 UTC 2022

Modified Files:
src/external/mpl/dhcp/dist: RELNOTES
src/external/mpl/dhcp/dist/common: options.c
src/external/mpl/dhcp/dist/common/tests: option_unittest.c

Log Message:
Apply security fixes:
https://downloads.isc.org/isc/dhcp/4.4.3-P1/patches/CVE-2022-2928.4-4-3.diff
https://downloads.isc.org/isc/dhcp/4.4.3-P1/patches/CVE-2022-2929.4-4-3.diff


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/mpl/dhcp/dist/RELNOTES
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/dist/common/options.c
cvs rdiff -u -r1.4 -r1.5 \
src/external/mpl/dhcp/dist/common/tests/option_unittest.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/mpl/dhcp/dist/RELNOTES
diff -u src/external/mpl/dhcp/dist/RELNOTES:1.1.1.4 src/external/mpl/dhcp/dist/RELNOTES:1.2
--- src/external/mpl/dhcp/dist/RELNOTES:1.1.1.4	Sat Apr  2 21:08:35 2022
+++ src/external/mpl/dhcp/dist/RELNOTES	Wed Oct  5 18:20:15 2022
@@ -1,10 +1,8 @@
 Internet Systems Consortium DHCP Distribution
-Version 4.4.3
-9 March 2022
+  Version 4.4.3-P1
+? ? 2022
 Release Notes
 
-NEW FEATURES
-
 Please note that that ISC DHCP is licensed under the Mozilla Public
 License, MPL 2.0. Please see https://www.mozilla.org/en-US/MPL/2.0/ to read
 the MPL 2.0 license terms.
@@ -28,6 +26,20 @@ ISC DHCP is open source software maintai
 Consortium.  This product includes cryptographic software written
 by Eric Young (e...@cryptsoft.com).
 
+		Changes since 4.4.3 (Bug Fixes)
+
+! Corrected a reference count leak that occurs when the server builds
+  responses to leasequery packets. Thanks to VictorV of Cyber Kunlun
+  Lab for reporting the issue.
+  [Gitblab #253]
+  CVE: CVS-2022-2928
+
+! Corrected a memory leak that occurs when unpacking a packet that has an
+  FQDN option (81) that contains a label whose lenght is greater than 63.
+  Thanks to VictorV of Cyber Kunlun Lab for reporting the issue.
+  [Gitblab #254]
+  CVE: CVS-2022-2929
+
 		Changes since 4.4.2-P1 (New Features)
 
 - Two new OMAPI function calls were added, `dhcpctl_timed_connect()`

Index: src/external/mpl/dhcp/dist/common/options.c
diff -u src/external/mpl/dhcp/dist/common/options.c:1.6 src/external/mpl/dhcp/dist/common/options.c:1.7
--- src/external/mpl/dhcp/dist/common/options.c:1.6	Sat Apr  2 21:10:58 2022
+++ src/external/mpl/dhcp/dist/common/options.c	Wed Oct  5 18:20:15 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: options.c,v 1.6 2022/04/03 01:10:58 christos Exp $	*/
+/*	$NetBSD: options.c,v 1.7 2022/10/05 22:20:15 christos Exp $	*/
 
 /* options.c
 
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: options.c,v 1.6 2022/04/03 01:10:58 christos Exp $");
+__RCSID("$NetBSD: options.c,v 1.7 2022/10/05 22:20:15 christos Exp $");
 
 #define DHCP_OPTION_DATA
 #include "dhcpd.h"
@@ -465,16 +465,16 @@ int fqdn_universe_decode (struct option_
 		while (s <  -> data[0] + length + 2) {
 			len = *s;
 			if (len > 63) {
-log_info ("fancy bits in fqdn option");
-return 0;
+log_info ("label length exceeds 63 in fqdn option");
+goto bad;
 			}
 			if (len == 0) {
 terminated = 1;
 break;
 			}
 			if (s + len >  -> data [0] + length + 3) {
-log_info ("fqdn tag longer than buffer");
-return 0;
+log_info ("fqdn label longer than buffer");
+goto bad;
 			}
 
 			if (first_len == 0) {
@@ -4463,6 +4463,8 @@ add_option(struct option_state *options,
 	if (!option_cache_allocate(, MDL)) {
 		log_error("No memory for option cache adding %s (option %d).",
 			  option->name, option_num);
+		/* Get rid of reference created during hash lookup. */
+		option_dereference(, MDL);
 		return 0;
 	}
 
@@ -4474,6 +4476,8 @@ add_option(struct option_state *options,
 			 MDL)) {
 		log_error("No memory for constant data adding %s (option %d).",
 			  option->name, option_num);
+		/* Get rid of reference created during hash lookup. */
+		option_dereference(, MDL);
 		option_cache_dereference(, MDL);
 		return 0;
 	}
@@ -4482,6 +4486,9 @@ add_option(struct option_state *options,
 	save_option(_universe, options, oc);
 	option_cache_dereference(, MDL);
 
+	/* Get rid of reference created during hash lookup. */
+	option_dereference(, MDL);
+
 	return 1;
 }
 

Index: src/external/mpl/dhcp/dist/common/tests/option_unittest.c
diff -u src/external/mpl/dhcp/dist/common/tests/option_unittest.c:1.4 src/external/mpl/dhcp/dist/common/tests/option_unittest.c:1.5
--- src/external/mpl/dhcp/dist/common/tests/option_unittest.c:1.4	Sat Apr  2 21:10:58 2022
+++ src/external/mpl/dhcp/dist/common/tests/option_unittest.c	Wed Oct  5 18:20:15 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: option_unittest.c,v 1.4 2022/04/03 01:10:58 

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

2022-09-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 23 12:30:52 UTC 2022

Modified Files:
src/external/mpl/dhcp/dist/server: mdb6.c

Log Message:
Adjust to new bind libraries


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/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/mpl/dhcp/dist/server/mdb6.c
diff -u src/external/mpl/dhcp/dist/server/mdb6.c:1.6 src/external/mpl/dhcp/dist/server/mdb6.c:1.7
--- src/external/mpl/dhcp/dist/server/mdb6.c:1.6	Sat Apr  2 21:11:00 2022
+++ src/external/mpl/dhcp/dist/server/mdb6.c	Fri Sep 23 08:30:52 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: mdb6.c,v 1.6 2022/04/03 01:11:00 christos Exp $	*/
+/*	$NetBSD: mdb6.c,v 1.7 2022/09/23 12:30:52 christos Exp $	*/
 
 /*
  * Copyright (C) 2007-2017 by Internet Systems Consortium, Inc. ("ISC")
@@ -17,7 +17,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: mdb6.c,v 1.6 2022/04/03 01:11:00 christos Exp $");
+__RCSID("$NetBSD: mdb6.c,v 1.7 2022/09/23 12:30:52 christos Exp $");
 
 
 /*!
@@ -671,19 +671,10 @@ ipv6_pool_allocate(struct ipv6_pool **po
 		dfree(tmp, file, line);
 		return ISC_R_NOMEMORY;
 	}
-	if (isc_heap_create(dhcp_gbl_ctx.mctx, lease_older, active_changed,
-			0, &(tmp->active_timeouts)) != ISC_R_SUCCESS) {
-		iasubopt_free_hash_table(&(tmp->leases), file, line);
-		dfree(tmp, file, line);
-		return ISC_R_NOMEMORY;
-	}
-	if (isc_heap_create(dhcp_gbl_ctx.mctx, lease_older, inactive_changed,
-			0, &(tmp->inactive_timeouts)) != ISC_R_SUCCESS) {
-		isc_heap_destroy(&(tmp->active_timeouts));
-		iasubopt_free_hash_table(&(tmp->leases), file, line);
-		dfree(tmp, file, line);
-		return ISC_R_NOMEMORY;
-	}
+	isc_heap_create(dhcp_gbl_ctx.mctx, lease_older, active_changed,
+			0, &(tmp->active_timeouts));
+	isc_heap_create(dhcp_gbl_ctx.mctx, lease_older, inactive_changed,
+			0, &(tmp->inactive_timeouts));
 
 	*pool = tmp;
 	return ISC_R_SUCCESS;
@@ -1411,7 +1402,6 @@ cleanup_lease6(ia_hash_t *ia_table,
 isc_result_t
 add_lease6(struct ipv6_pool *pool, struct iasubopt *lease,
 	   time_t valid_lifetime_end_time) {
-	isc_result_t insert_result;
 	struct iasubopt *test_iasubopt;
 	struct iasubopt *tmp_iasubopt;
 
@@ -1479,34 +1469,25 @@ add_lease6(struct ipv6_pool *pool, struc
 		tmp_iasubopt->hard_lifetime_end_time = valid_lifetime_end_time;
 		iasubopt_hash_add(pool->leases, _iasubopt->addr, 
   sizeof(tmp_iasubopt->addr), lease, MDL);
-		insert_result = isc_heap_insert(pool->active_timeouts,
-		tmp_iasubopt);
-		if (insert_result == ISC_R_SUCCESS) {
-			pool->num_active++;
-			if (pool->ipv6_pond)
-pool->ipv6_pond->num_active++;
+		isc_heap_insert(pool->active_timeouts, tmp_iasubopt);
+		pool->num_active++;
+		if (pool->ipv6_pond)
+			pool->ipv6_pond->num_active++;
 
-			if (tmp_iasubopt->state == FTS_ABANDONED) {
-pool->num_abandoned++;
-if (pool->ipv6_pond)
-	pool->ipv6_pond->num_abandoned++;
-			}
+		if (tmp_iasubopt->state == FTS_ABANDONED) {
+			pool->num_abandoned++;
+			if (pool->ipv6_pond)
+pool->ipv6_pond->num_abandoned++;
 		}
 
 	} else {
 		tmp_iasubopt->soft_lifetime_end_time = valid_lifetime_end_time;
-		insert_result = isc_heap_insert(pool->inactive_timeouts,
-		tmp_iasubopt);
-		if (insert_result == ISC_R_SUCCESS)
-			pool->num_inactive++;
-	}
-	if (insert_result != ISC_R_SUCCESS) {
-		iasubopt_hash_delete(pool->leases, >addr, 
- sizeof(lease->addr), MDL);
-		iasubopt_dereference(_iasubopt, MDL);
-		return insert_result;
+		isc_heap_insert(pool->inactive_timeouts, tmp_iasubopt);
+		pool->num_inactive++;
 	}
-
+	iasubopt_hash_delete(pool->leases, >addr, 
+			 sizeof(lease->addr), MDL);
+	iasubopt_dereference(_iasubopt, MDL);
 	/* 
 	 * Note: we intentionally leave tmp_iasubopt referenced; there
 	 * is a reference in the heap/hash, after all.
@@ -1569,22 +1550,18 @@ lease6_usable(struct iasubopt *lease) {
  */
 static isc_result_t
 move_lease_to_active(struct ipv6_pool *pool, struct iasubopt *lease) {
-	isc_result_t insert_result;
-
-	insert_result = isc_heap_insert(pool->active_timeouts, lease);
-	if (insert_result == ISC_R_SUCCESS) {
-   		iasubopt_hash_add(pool->leases, >addr, 
-  sizeof(lease->addr), lease, MDL);
-		isc_heap_delete(pool->inactive_timeouts,
-lease->inactive_index);
-		pool->num_active++;
-		pool->num_inactive--;
-		lease->state = FTS_ACTIVE;
-		if (pool->ipv6_pond)
-			pool->ipv6_pond->num_active++;
+	isc_heap_insert(pool->active_timeouts, lease);
+	iasubopt_hash_add(pool->leases, >addr, 
+			  sizeof(lease->addr), lease, MDL);
+	isc_heap_delete(pool->inactive_timeouts,
+			lease->inactive_index);
+	pool->num_active++;
+	pool->num_inactive--;
+	lease->state = FTS_ACTIVE;
+	if (pool->ipv6_pond)
+		pool->ipv6_pond->num_active++;
 
-	}
-	return insert_result;
+	return ISC_R_SUCCESS;
 }
 
 /*!
@@ -1656,72 +1633,69 @@ renew_lease6(struct ipv6_pool *pool, str
 static 

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

2022-09-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 23 12:30:52 UTC 2022

Modified Files:
src/external/mpl/dhcp/dist/server: mdb6.c

Log Message:
Adjust to new bind libraries


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/dist/server/mdb6.c

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



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

2022-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr  3 01:11:00 UTC 2022

Modified Files:
src/external/mpl/dhcp/dist/client: client_tables.c clparse.c dhc6.c
dhclient-script.8 dhclient.8 dhclient.c dhclient.conf.5
dhclient.leases.5
src/external/mpl/dhcp/dist/client/tests: duid_unittest.c
src/external/mpl/dhcp/dist/common: alloc.c bpf.c comapi.c conflex.c
ctrace.c dhcp-eval.5 dhcp-options.5 dhcp4o6.c discover.c dispatch.c
dlpi.c dns.c ethernet.c execute.c fddi.c icmp.c inet.c lpf.c
memory.c nit.c ns_name.c options.c packet.c parse.c print.c raw.c
resolv.c socket.c tables.c tr.c tree.c upf.c
src/external/mpl/dhcp/dist/common/tests: option_unittest.c
src/external/mpl/dhcp/dist/dhcpctl: callback.c cltest.c cltest2.c
dhcpctl.3 dhcpctl.c dhcpctl.h omshell.1 omshell.c remote.c
src/external/mpl/dhcp/dist/doc/ja_JP.eucJP: dhclient-script.8
dhclient.8 dhclient.conf.5 dhclient.leases.5 dhcp-eval.5
dhcp-options.5
src/external/mpl/dhcp/dist/includes: cdefs.h ctrace.h dhcp.h dhcp6.h
dhcpd.h dhctoken.h failover.h inet.h ldap_casa.h ns_name.h osdep.h
site.h statement.h tree.h
src/external/mpl/dhcp/dist/includes/arpa: nameser.h
src/external/mpl/dhcp/dist/includes/netinet: udp.h
src/external/mpl/dhcp/dist/includes/omapip: alloc.h buffer.h convert.h
hash.h isclib.h omapip.h omapip_p.h result.h trace.h
src/external/mpl/dhcp/dist/keama: conflex.c confparse.c data.c data.h
dhctoken.h eval.c json.c keama.8 keama.c keama.h options.c parse.c
print.c reduce.c
src/external/mpl/dhcp/dist/omapip: alloc.c array.c auth.c buffer.c
connection.c convert.c dispatch.c errwarn.c generic.c handle.c
hash.c isclib.c listener.c message.c omapi.3 protocol.c result.c
support.c test.c toisc.c trace.c
src/external/mpl/dhcp/dist/relay: dhcrelay.8 dhcrelay.c
src/external/mpl/dhcp/dist/relay/tests: relay_unittests.c
src/external/mpl/dhcp/dist/server: bootp.c class.c confpars.c db.c
ddns.c dhcp.c dhcpd.8 dhcpd.c dhcpd.conf.5 dhcpd.leases.5
failover.c ldap.c ldap_casa.c leasechain.c mdb.c mdb6.c omapi.c
salloc.c stables.c
src/external/mpl/dhcp/dist/server/tests: hash_unittest.c

Log Message:
Merge conflicts between dhcp-4.4.2P1 and dhcp-4.4.3


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/mpl/dhcp/dist/client/client_tables.c \
src/external/mpl/dhcp/dist/client/dhclient-script.8 \
src/external/mpl/dhcp/dist/client/dhclient.conf.5 \
src/external/mpl/dhcp/dist/client/dhclient.leases.5
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/dist/client/clparse.c \
src/external/mpl/dhcp/dist/client/dhc6.c \
src/external/mpl/dhcp/dist/client/dhclient.8
cvs rdiff -u -r1.4 -r1.5 src/external/mpl/dhcp/dist/client/dhclient.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/mpl/dhcp/dist/client/tests/duid_unittest.c
cvs rdiff -u -r1.2 -r1.3 src/external/mpl/dhcp/dist/common/alloc.c \
src/external/mpl/dhcp/dist/common/comapi.c \
src/external/mpl/dhcp/dist/common/conflex.c \
src/external/mpl/dhcp/dist/common/ctrace.c \
src/external/mpl/dhcp/dist/common/dhcp-eval.5 \
src/external/mpl/dhcp/dist/common/dhcp4o6.c \
src/external/mpl/dhcp/dist/common/dispatch.c \
src/external/mpl/dhcp/dist/common/dlpi.c \
src/external/mpl/dhcp/dist/common/ethernet.c \
src/external/mpl/dhcp/dist/common/fddi.c \
src/external/mpl/dhcp/dist/common/icmp.c \
src/external/mpl/dhcp/dist/common/inet.c \
src/external/mpl/dhcp/dist/common/memory.c \
src/external/mpl/dhcp/dist/common/nit.c \
src/external/mpl/dhcp/dist/common/print.c \
src/external/mpl/dhcp/dist/common/resolv.c \
src/external/mpl/dhcp/dist/common/tr.c \
src/external/mpl/dhcp/dist/common/tree.c \
src/external/mpl/dhcp/dist/common/upf.c
cvs rdiff -u -r1.4 -r1.5 src/external/mpl/dhcp/dist/common/bpf.c \
src/external/mpl/dhcp/dist/common/discover.c \
src/external/mpl/dhcp/dist/common/dns.c \
src/external/mpl/dhcp/dist/common/parse.c \
src/external/mpl/dhcp/dist/common/socket.c
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/dist/common/dhcp-options.5 \
src/external/mpl/dhcp/dist/common/execute.c \
src/external/mpl/dhcp/dist/common/lpf.c \
src/external/mpl/dhcp/dist/common/ns_name.c \
src/external/mpl/dhcp/dist/common/packet.c \
src/external/mpl/dhcp/dist/common/raw.c \
src/external/mpl/dhcp/dist/common/tables.c
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/dhcp/dist/common/options.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/mpl/dhcp/dist/common/tests/option_unittest.c
cvs rdiff -u -r1.2 -r1.3 src/external/mpl/dhcp/dist/dhcpctl/callback.c \
src/external/mpl/dhcp/dist/dhcpctl/cltest.c \

CVS commit: src/external/mpl/dhcp/dist/omapip

2022-01-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 30 19:47:04 UTC 2022

Modified Files:
src/external/mpl/dhcp/dist/omapip: isclib.c

Log Message:
Bump the number of "workers" to 2 which effectively bumps the number of
contexts to 8. We seem to need 5 contexts so that should stop the error
checking to hp_retire() from triggering.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/dist/omapip/isclib.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/mpl/dhcp/dist/omapip/isclib.c
diff -u src/external/mpl/dhcp/dist/omapip/isclib.c:1.6 src/external/mpl/dhcp/dist/omapip/isclib.c:1.7
--- src/external/mpl/dhcp/dist/omapip/isclib.c:1.6	Thu Aug 19 07:50:56 2021
+++ src/external/mpl/dhcp/dist/omapip/isclib.c	Sun Jan 30 14:47:04 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: isclib.c,v 1.6 2021/08/19 11:50:56 christos Exp $	*/
+/*	$NetBSD: isclib.c,v 1.7 2022/01/30 19:47:04 christos Exp $	*/
 
 /*
  * Copyright(c) 2009-2019 by Internet Systems Consortium, Inc.("ISC")
@@ -24,7 +24,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: isclib.c,v 1.6 2021/08/19 11:50:56 christos Exp $");
+__RCSID("$NetBSD: isclib.c,v 1.7 2022/01/30 19:47:04 christos Exp $");
 
 /*Trying to figure out what we need to define to get things to work.
   It looks like we want/need the library but need the fdwatchcommand
@@ -220,7 +220,7 @@ dhcp_context_create(int flags,
 		result = isc_appctx_create(dhcp_gbl_ctx.mctx,
 	   _gbl_ctx.actx);
 
-		result = isc_managers_create(dhcp_gbl_ctx.mctx, 1, 0,
+		result = isc_managers_create(dhcp_gbl_ctx.mctx, 2, 0,
 		_gbl_ctx.netmgr, _gbl_ctx.taskmgr);
 		if (result != ISC_R_SUCCESS)
 			goto cleanup;



CVS commit: src/external/mpl/dhcp/dist/omapip

2022-01-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 30 19:47:04 UTC 2022

Modified Files:
src/external/mpl/dhcp/dist/omapip: isclib.c

Log Message:
Bump the number of "workers" to 2 which effectively bumps the number of
contexts to 8. We seem to need 5 contexts so that should stop the error
checking to hp_retire() from triggering.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/dhcp/dist/omapip/isclib.c

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



CVS commit: src/external/mpl/dhcp

2021-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 19 11:50:57 UTC 2021

Modified Files:
src/external/mpl/dhcp: Makefile.inc
src/external/mpl/dhcp/dist/includes/omapip: isclib.h
src/external/mpl/dhcp/dist/omapip: isclib.c

Log Message:
Adjust for bind-9.16.20


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/mpl/dhcp/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/dist/includes/omapip/isclib.h
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/dhcp/dist/omapip/isclib.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/mpl/dhcp/Makefile.inc
diff -u src/external/mpl/dhcp/Makefile.inc:1.10 src/external/mpl/dhcp/Makefile.inc:1.11
--- src/external/mpl/dhcp/Makefile.inc:1.10	Tue Apr 13 00:14:46 2021
+++ src/external/mpl/dhcp/Makefile.inc	Thu Aug 19 07:50:56 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.10 2021/04/13 04:14:46 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.11 2021/08/19 11:50:56 christos Exp $
 
 WARNS?=	1	# XXX -Wshadow -Wcast-qual -Wsign-compare
 
@@ -45,8 +45,8 @@ LDADD+= -lirs -lisccfg -ldns -lisc
 LDADD+= -L${LIBUVOBJDIR} -luv
 DPADD+= ${LIBIRS} ${LIBISCCFG} ${LIBDNS} ${LIBISC} ${LIBUV}
 DPADD+= ${LIBUVOBJDIR}/libuv.a
-LDADD+= -lkvm -lpthread -lz
-DPADD+= ${LIBKVM} ${LIBPTHREAD} ${LIBZ}
+LDADD+= -lexecinfo -lkvm -lpthread -lz
+DPADD+= ${LIBEXECINFO} ${LIBKVM} ${LIBPTHREAD} ${LIBZ}
 .if (${MKKERBEROS} != "no")
 LDADD+= -lgssapi -lheimntlm ${LIBKRB5_LDADD} ${LIBKRB5_STATIC_LDADD}
 DPADD+= ${LIBKRB5_DPADD} ${LIBHEIMNTLM} ${LIBGSSAPI} ${LIBKRB5_STATIC_DPADD}

Index: src/external/mpl/dhcp/dist/includes/omapip/isclib.h
diff -u src/external/mpl/dhcp/dist/includes/omapip/isclib.h:1.3 src/external/mpl/dhcp/dist/includes/omapip/isclib.h:1.4
--- src/external/mpl/dhcp/dist/includes/omapip/isclib.h:1.3	Mon Aug  3 17:10:57 2020
+++ src/external/mpl/dhcp/dist/includes/omapip/isclib.h	Thu Aug 19 07:50:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: isclib.h,v 1.3 2020/08/03 21:10:57 christos Exp $	*/
+/*	$NetBSD: isclib.h,v 1.4 2021/08/19 11:50:56 christos Exp $	*/
 
 /* isclib.h
 
@@ -54,6 +54,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -96,6 +97,7 @@ typedef struct dhcp_context {
 	int  actx_started; // ISC_TRUE if ctxstart has been called
 	int  actx_running; // ISC_TRUE if ctxrun has been called
 	isc_taskmgr_t	*taskmgr;
+	isc_nm_t	*netmgr;
 	isc_task_t	*task;
 	isc_socketmgr_t *socketmgr;
 	isc_timermgr_t	*timermgr;

Index: src/external/mpl/dhcp/dist/omapip/isclib.c
diff -u src/external/mpl/dhcp/dist/omapip/isclib.c:1.5 src/external/mpl/dhcp/dist/omapip/isclib.c:1.6
--- src/external/mpl/dhcp/dist/omapip/isclib.c:1.5	Mon Aug  3 17:10:57 2020
+++ src/external/mpl/dhcp/dist/omapip/isclib.c	Thu Aug 19 07:50:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: isclib.c,v 1.5 2020/08/03 21:10:57 christos Exp $	*/
+/*	$NetBSD: isclib.c,v 1.6 2021/08/19 11:50:56 christos Exp $	*/
 
 /*
  * Copyright(c) 2009-2019 by Internet Systems Consortium, Inc.("ISC")
@@ -24,7 +24,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: isclib.c,v 1.5 2020/08/03 21:10:57 christos Exp $");
+__RCSID("$NetBSD: isclib.c,v 1.6 2021/08/19 11:50:56 christos Exp $");
 
 /*Trying to figure out what we need to define to get things to work.
   It looks like we want/need the library but need the fdwatchcommand
@@ -109,7 +109,8 @@ isclib_cleanup(void)
 		isc_socketmgr_destroy(_gbl_ctx.socketmgr);
 
 	if (dhcp_gbl_ctx.taskmgr != NULL)
-		isc_taskmgr_destroy(_gbl_ctx.taskmgr);
+		isc_managers_destroy(_gbl_ctx.netmgr,
+ _gbl_ctx.taskmgr);
 
 	if (dhcp_gbl_ctx.actx_started != ISC_FALSE) {
 		isc_app_ctxfinish(dhcp_gbl_ctx.actx);
@@ -218,22 +219,19 @@ dhcp_context_create(int flags,
 
 		result = isc_appctx_create(dhcp_gbl_ctx.mctx,
 	   _gbl_ctx.actx);
-		if (result != ISC_R_SUCCESS)
-			goto cleanup;
 
-		result = isc_taskmgr_createinctx(dhcp_gbl_ctx.mctx,
-		 1, 0,
-		 _gbl_ctx.taskmgr);
+		result = isc_managers_create(dhcp_gbl_ctx.mctx, 1, 0,
+		_gbl_ctx.netmgr, _gbl_ctx.taskmgr);
 		if (result != ISC_R_SUCCESS)
 			goto cleanup;
 
-		result = isc_socketmgr_createinctx(dhcp_gbl_ctx.mctx,
-		   _gbl_ctx.socketmgr);
+		result = isc_socketmgr_create(dhcp_gbl_ctx.mctx,
+	  _gbl_ctx.socketmgr);
 		if (result != ISC_R_SUCCESS)
 			goto cleanup;
 
-		result = isc_timermgr_createinctx(dhcp_gbl_ctx.mctx,
-		  _gbl_ctx.timermgr);
+		result = isc_timermgr_create(dhcp_gbl_ctx.mctx,
+	 _gbl_ctx.timermgr);
 		if (result != ISC_R_SUCCESS)
 			goto cleanup;
 
@@ -395,19 +393,19 @@ void dhcp_signal_handler(int signal) {
 isc_result_t dns_client_init() {
 	isc_result_t result;
 	if (dhcp_gbl_ctx.dnsclient == NULL) {
-		result = dns_client_createx(dhcp_gbl_ctx.mctx,
-	 dhcp_gbl_ctx.actx,
-	 dhcp_gbl_ctx.taskmgr,
-	 dhcp_gbl_ctx.socketmgr,
-	 dhcp_gbl_ctx.timermgr,
-	 0,
-	 

CVS commit: src/external/mpl/dhcp

2021-08-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 19 11:50:57 UTC 2021

Modified Files:
src/external/mpl/dhcp: Makefile.inc
src/external/mpl/dhcp/dist/includes/omapip: isclib.h
src/external/mpl/dhcp/dist/omapip: isclib.c

Log Message:
Adjust for bind-9.16.20


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/mpl/dhcp/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/dist/includes/omapip/isclib.h
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/dhcp/dist/omapip/isclib.c

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



Re: CVS commit: src/external/mpl/dhcp/dist/common

2020-05-15 Thread Christos Zoulas
In article <20200515123104.297c5f...@cvs.netbsd.org>,
Emmanuel Dreyfus  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  manu
>Date:  Fri May 15 12:31:04 UTC 2020
>
>Modified Files:
>   src/external/mpl/dhcp/dist/common: bpf.c discover.c lpf.c packet.c
>   raw.c socket.c
>
>Log Message:
>crunchgen fix
>
>Make sure local_port is not shared within a crunchgen binary. There is
>more to do to get full functionnality in crunchgen, but at least this
>change makes dhcpd listen on the right port again.

Can't this be done with -Dlocal_port= in the Makefile?

christos



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

2019-10-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 30 00:25:00 UTC 2019

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

Log Message:
Looks like builtin_object_size does not work properly on sh3...


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

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



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

2019-10-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 30 00:25:00 UTC 2019

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

Log Message:
Looks like builtin_object_size does not work properly on sh3...


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/mpl/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/mpl/dhcp/bin/server/Makefile
diff -u src/external/mpl/dhcp/bin/server/Makefile:1.1 src/external/mpl/dhcp/bin/server/Makefile:1.2
--- src/external/mpl/dhcp/bin/server/Makefile:1.1	Sat Apr  7 18:31:37 2018
+++ src/external/mpl/dhcp/bin/server/Makefile	Tue Oct 29 20:25:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+# $NetBSD: Makefile,v 1.2 2019/10/30 00:25:00 christos Exp $
 
 .include 
 
@@ -15,6 +15,10 @@ FILESDIR= /usr/share/examples/dhcp
 FILES=	dhcpd.conf
 .endif
 
+.if !empty(MACHINE_ARCH:Msh3*)
+COPTS.ddns.c +=-Wno-stringop-overflow
+.endif
+
 COPTS.omapi.c +=	-Wno-stack-protector
 
 .include 



Re: CVS commit: src/external/mpl/dhcp

2018-06-22 Thread Christos Zoulas
In article <12738.1529677...@splode.eterna.com.au>,
matthew green   wrote:
>
>why does dhclient link this way?  at the very least, adding
>a comment to the Makefile.inc would help, but i wonder if this
>is not some artifact of old times we should remove, at least
>for MKDYNAMICROOT=yes.

Explained.

christos



Re: CVS commit: src/external/mpl/dhcp

2018-06-22 Thread Kamil Rytarowski
On 22.06.2018 17:05, Jason Thorpe wrote:
> 
> 
>> On Jun 22, 2018, at 7:44 AM, matthew green  wrote:
>>
>> meaning -- it uses libraries normally installed in /usr/lib but
>> links them statically?
>>
>> those libraries should move to /lib.  they're already part of
>> the root fs (mostly).  then all this stupid makefile and linking
>> crap can go away, and your problem solved.
> 
> Modulo the silliness of continuing to support /usr on a separate file system, 
> "what Matt said."
> 
> -- thorpej
> 

From a MKSANITIZER point of view we want to remove conflicts with libc
and libpthread symbols.

http://netbsd.org/~kamil/programs-baselibs-symbol-clash-2018-06-03-2.txt



signature.asc
Description: OpenPGP digital signature


re: CVS commit: src/external/mpl/dhcp

2018-06-22 Thread matthew green
> Well, there is an ongoing discussion to phase out dhcp (dhclient) out of
> the base system.

i'm going to object to that -- while i prefer dhcpcd i've twice
needed for temporary issues, and not having working networking
while travelling (this was one case) is really not something we
want to deal with ;)

this is also irrelevant to the problem at hand.

> It duplicates symbols from libraries in order to be usable without /usr
> mounted.

meaning -- it uses libraries normally installed in /usr/lib but
links them statically?

those libraries should move to /lib.  they're already part of
the root fs (mostly).  then all this stupid makefile and linking
crap can go away, and your problem solved.


.mrg.


Re: CVS commit: src/external/mpl/dhcp

2018-06-22 Thread Kamil Rytarowski
On 22.06.2018 16:18, matthew green wrote:
> "Kamil Rytarowski" writes:
>> Module Name: src
>> Committed By:kamil
>> Date:Thu Jun 21 11:02:48 UTC 2018
>>
>> Modified Files:
>>  src/external/mpl/dhcp: Makefile.inc
>>
>> Log Message:
>> Make building of dhcp compatible with MKSANITIZER
>>
>> Disable LD flags (-Wl,-Bstatic and -Wl,-Bdynamic) with enabled MKSANITIZER.
>> These options are incompatible with the current design of sanitizers,
>> because they cause duplication of symbols into programs and thus symbols
>> from the interceptors from sanitizers cannot be linked.
>>
>> This change makes effectively mounting /usr required for dhcp programs like
>> dhclient(8).
> 
> why does dhclient link this way?  at the very least, adding
> a comment to the Makefile.inc would help, but i wonder if this
> is not some artifact of old times we should remove, at least
> for MKDYNAMICROOT=yes.
> 
> 
> .mrg.
> 

Well, there is an ongoing discussion to phase out dhcp (dhclient) out of
the base system.

It duplicates symbols from libraries in order to be usable without /usr
mounted. dhcpcd doesn't need it.



signature.asc
Description: OpenPGP digital signature


re: CVS commit: src/external/mpl/dhcp

2018-06-22 Thread matthew green
"Kamil Rytarowski" writes:
> Module Name:  src
> Committed By: kamil
> Date: Thu Jun 21 11:02:48 UTC 2018
> 
> Modified Files:
>   src/external/mpl/dhcp: Makefile.inc
> 
> Log Message:
> Make building of dhcp compatible with MKSANITIZER
> 
> Disable LD flags (-Wl,-Bstatic and -Wl,-Bdynamic) with enabled MKSANITIZER.
> These options are incompatible with the current design of sanitizers,
> because they cause duplication of symbols into programs and thus symbols
> from the interceptors from sanitizers cannot be linked.
> 
> This change makes effectively mounting /usr required for dhcp programs like
> dhclient(8).

why does dhclient link this way?  at the very least, adding
a comment to the Makefile.inc would help, but i wonder if this
is not some artifact of old times we should remove, at least
for MKDYNAMICROOT=yes.


.mrg.


Re: CVS commit: src/external/mpl/dhcp

2018-06-21 Thread Kamil Rytarowski
On 21.06.2018 13:09, Paul Goyette wrote:
> On Thu, 21 Jun 2018, Kamil Rytarowski wrote:
> 
>> Module Name:    src
>> Committed By:    kamil
>> Date:    Thu Jun 21 11:02:48 UTC 2018
>>
>> Modified Files:
>> src/external/mpl/dhcp: Makefile.inc
>>
>> Log Message:
>> Make building of dhcp compatible with MKSANITIZER
>>
>> Disable LD flags (-Wl,-Bstatic and -Wl,-Bdynamic) with enabled
>> MKSANITIZER.
>> These options are incompatible with the current design of sanitizers,
>> because they cause duplication of symbols into programs and thus symbols
>> from the interceptors from sanitizers cannot be linked.
>>
>> This change makes effectively mounting /usr required for dhcp programs
>> like
>> dhclient(8).
> 
> This could be difficult if /usr is nfs-mount and requires dhcp and
> friends for setting up the network.
> 
> 

There is no functional change for MKSANITIZER=no users (the default ones).

For MKSANITIZER=yes ones it's a tradeoff.



signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/external/mpl/dhcp

2018-06-21 Thread Paul Goyette

On Thu, 21 Jun 2018, Kamil Rytarowski wrote:


Module Name:src
Committed By:   kamil
Date:   Thu Jun 21 11:02:48 UTC 2018

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

Log Message:
Make building of dhcp compatible with MKSANITIZER

Disable LD flags (-Wl,-Bstatic and -Wl,-Bdynamic) with enabled MKSANITIZER.
These options are incompatible with the current design of sanitizers,
because they cause duplication of symbols into programs and thus symbols
from the interceptors from sanitizers cannot be linked.

This change makes effectively mounting /usr required for dhcp programs like
dhclient(8).


This could be difficult if /usr is nfs-mount and requires dhcp and 
friends for setting up the network.




+--+--++
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:  |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+--+--++