Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174536005
D55905.id173827.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55905.id173827.diff
View Options
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1649,21 +1649,31 @@
}
static void
-nd6_queue_rel(void *arg)
+nd6_queue_rel_locked(struct nd_queue *ndq)
{
- struct nd_queue *ndq = arg;
- struct ifaddr *ifa = ndq->ndq_ifa;
+ struct ifaddr *ifa;
+ ifa = ndq->ndq_ifa;
IF_ADDR_WLOCK_ASSERT(ifa->ifa_ifp);
/* Remove ndq from the nd_queue and free it */
TAILQ_REMOVE(&ifa->ifa_ifp->if_inet6->nd_queue, ndq, ndq_list);
free(ndq, M_IP6NDP);
- IF_ADDR_WUNLOCK(ifa->ifa_ifp);
-
ifa_free(ifa);
}
+static void
+nd6_queue_rel(void *arg)
+{
+ struct nd_queue *ndq = arg;
+ struct ifnet *ifp;
+
+ ifp = ndq->ndq_ifa->ifa_ifp;
+ IF_ADDR_WLOCK_ASSERT(ifp);
+ nd6_queue_rel_locked(ndq);
+ IF_ADDR_WUNLOCK(ifp);
+}
+
static void
nd6_queue_timer(void *arg)
{
@@ -1825,18 +1835,19 @@
void
nd6_queue_stop(struct ifaddr *ifa)
{
- struct nd_queue *ndq;
+ struct nd_queue *ndq, *dndq;
+ struct ifnet *ifp;
- IF_ADDR_WLOCK(ifa->ifa_ifp);
- TAILQ_FOREACH(ndq, &ifa->ifa_ifp->if_inet6->nd_queue, ndq_list) {
+ ifp = ifa->ifa_ifp;
+ IF_ADDR_WLOCK(ifp);
+ TAILQ_FOREACH_SAFE(ndq, &ifp->if_inet6->nd_queue, ndq_list, dndq) {
if (ndq->ndq_ifa != ifa)
continue;
callout_stop(&ndq->ndq_callout);
- nd6_queue_rel(ndq);
- return;
+ nd6_queue_rel_locked(ndq);
}
- IF_ADDR_WUNLOCK(ifa->ifa_ifp);
+ IF_ADDR_WUNLOCK(ifp);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 5, 12:24 AM (4 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40216900
Default Alt Text
D55905.id173827.diff (1 KB)
Attached To
Mode
D55905: ndp: Accept multiple queued ND for non-GRAND NAs
Attached
Detach File
Event Timeline
Log In to Comment