summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2024-07-29 12:41:31 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2024-07-29 12:41:31 +0000
commitb02e5b79651e29b9d52b0cab29f202016f62ba00 (patch)
treeaa3f5e2c1d9256a054fce27bc94432ed30ff145a /sys/netinet6
parent237603c61c78df4286a809df9a482373de6f32d4 (diff)
Use shared net lock instead of exclusive when frag6 calls icmp6_error().
OK mvs@ a while ago as part of a larger diff
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/frag6.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 1b528b30b99..4c0e9d4b363 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frag6.c,v 1.88 2024/03/26 23:48:49 bluhm Exp $ */
+/* $OpenBSD: frag6.c,v 1.89 2024/07/29 12:41:30 bluhm Exp $ */
/* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */
/*
@@ -130,7 +130,8 @@ frag6_input(struct mbuf **mp, int *offp, int proto, int af)
/* jumbo payload can't contain a fragment header */
if (ip6->ip6_plen == 0) {
- icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset);
+ icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
+ offset);
return IPPROTO_DONE;
}
@@ -544,10 +545,10 @@ frag6_freef(struct ip6q *q6)
ip6->ip6_src = q6->ip6q_src;
ip6->ip6_dst = q6->ip6q_dst;
- NET_LOCK();
+ NET_LOCK_SHARED();
icmp6_error(m, ICMP6_TIME_EXCEEDED,
ICMP6_TIME_EXCEED_REASSEMBLY, 0);
- NET_UNLOCK();
+ NET_UNLOCK_SHARED();
} else
m_freem(m);
pool_put(&ip6af_pool, af6);