summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2004-08-12 08:37:42 +0000
committerandre <andre@FreeBSD.org>2004-08-12 08:37:42 +0000
commit6822e5677f769043f35002692c2631891f6146bf (patch)
tree3840a1e202d7b1df5c5c9e1e30a8fe66185a33a7 /sys/netinet/ip_input.c
parenta71e43e2c6611fc70b09ee8bc7e6ef48f58b9ef8 (diff)
downloadFreeBSD-src-6822e5677f769043f35002692c2631891f6146bf.zip
FreeBSD-src-6822e5677f769043f35002692c2631891f6146bf.tar.gz
Fix two cases of incorrect IPQ_UNLOCK'ing in the merged ip_reass() function.
The first one was going to 'dropfrag', which unlocks the IPQ, before the lock was aquired; The second one doing a unlock and then a 'goto dropfrag' which led to a double-unlock. Tripped over by: des
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 61db043..0d64eff 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -895,7 +895,8 @@ ip_reass(struct mbuf *m)
if (maxnipq == 0) {
ipstat.ips_fragments++;
ipstat.ips_fragdropped++;
- goto dropfrag;
+ m_freem(m);
+ return (NULL);
}
ip = mtod(m, struct ip *);
@@ -959,7 +960,6 @@ found:
* that's a non-zero multiple of 8 bytes.
*/
if (ip->ip_len == 0 || (ip->ip_len & 0x7) != 0) {
- IPQ_UNLOCK();
ipstat.ips_toosmall++; /* XXX */
goto dropfrag;
}
OpenPOWER on IntegriCloud