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) (&q->what, MDL);
 		}
 		q->next = free_timeouts;
+		isc_event_free(&eventp);
 		isc_timer_destroy(&q->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(&eventp);
 	}
 
-	isc_event_free(&eventp);
 	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) (&q->what, MDL);
 		}
 		q->next = free_timeouts;
-		isc_timer_detach(&q->isc_timeout);
+		isc_timer_destroy(&q->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(&q->isc_timeout);
+			isc_timer_destroy(&q->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(&t->isc_timeout);
+		isc_timer_destroy(&t->isc_timeout);
 		if (t->unref && t->what)
 			(*t->unref) (&t->what, MDL);
 		t->next = free_timeouts;



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