Module Name:    src
Committed By:   riastradh
Date:           Thu May 30 23:00:39 UTC 2024

Modified Files:
        src/sys/net: nd.c

Log Message:
nd_timer: Update la_numheld when we clear la_hold (a.k.a. ln_hold).

Followup for PR kern/58297 fix.  Patch by mlelstv@.

PR kern/58301


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/net/nd.c

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

Modified files:

Index: src/sys/net/nd.c
diff -u src/sys/net/nd.c:1.6 src/sys/net/nd.c:1.7
--- src/sys/net/nd.c:1.6	Tue May 28 22:15:22 2024
+++ src/sys/net/nd.c	Thu May 30 23:00:39 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd.c,v 1.6 2024/05/28 22:15:22 riastradh Exp $	*/
+/*	$NetBSD: nd.c,v 1.7 2024/05/30 23:00:39 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd.c,v 1.6 2024/05/28 22:15:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd.c,v 1.7 2024/05/30 23:00:39 riastradh Exp $");
 
 #include <sys/callout.h>
 #include <sys/mbuf.h>
@@ -105,8 +105,12 @@ nd_timer(void *arg)
 
 			m->m_nextpkt = NULL;
 			ln->ln_hold = NULL;
+			ln->la_numheld = 0;
 		}
 
+		KASSERTMSG(ln->la_numheld == 0, "la_numheld=%d",
+		    ln->la_numheld);
+
 		missed = ND_LLINFO_INCOMPLETE;
 		ln->ln_state = ND_LLINFO_WAITDELETE;
 		break;

Reply via email to