Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 When deleting a fragment header use the simple ...
details: https://anonhg.NetBSD.org/src/rev/f22c2e52e19d
branches: trunk
changeset: 761274:f22c2e52e19d
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sat Jan 22 18:26:36 2011 +0000
description:
When deleting a fragment header use the simple copy operation only if it fits
completely into the mbuf.
diffstat:
sys/netinet6/frag6.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 39a9e1a67c7d -r f22c2e52e19d sys/netinet6/frag6.c
--- a/sys/netinet6/frag6.c Sat Jan 22 18:26:12 2011 +0000
+++ b/sys/netinet6/frag6.c Sat Jan 22 18:26:36 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: frag6.c,v 1.47 2009/03/18 16:00:22 cegger Exp $ */
+/* $NetBSD: frag6.c,v 1.48 2011/01/22 18:26:36 mlelstv Exp $ */
/* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.47 2009/03/18 16:00:22 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.48 2011/01/22 18:26:36 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -517,7 +517,7 @@
/*
* Delete frag6 header with as a few cost as possible.
*/
- if (offset < m->m_len) {
+ if (m->m_len >= offset + sizeof(struct ip6_frag)) {
memmove((char *)ip6 + sizeof(struct ip6_frag), ip6, offset);
m->m_data += sizeof(struct ip6_frag);
m->m_len -= sizeof(struct ip6_frag);
Home |
Main Index |
Thread Index |
Old Index