From 9017c2c0e202f5ca190712d0a33835063905389a Mon Sep 17 00:00:00 2001 From: riastradh Date: Thu, 30 May 2024 23:00:39 +0000 Subject: [PATCH] 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 --- sys/net/nd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/net/nd.c b/sys/net/nd.c index e99535d62ea5..e0968baacafa 100644 --- a/sys/net/nd.c +++ b/sys/net/nd.c @@ -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 -__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 #include @@ -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;