Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/netinet Pull up revision 1.65 (requested by itojun):



details:   https://anonhg.NetBSD.org/src/rev/277b3c4a0424
branches:  netbsd-1-4
changeset: 469927:277b3c4a0424
user:      he <he%NetBSD.org@localhost>
date:      Mon Dec 20 15:48:26 1999 +0000

description:
Pull up revision 1.65 (requested by itojun):
  Avoid panic caused by shared cluster mbuf overwrite on multicast
  packet loopback for packets with certain sizes.  Fixes PR#9020.

diffstat:

 sys/netinet/ip_output.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 7fa719a0dd22 -r 277b3c4a0424 sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c   Mon Dec 20 15:42:15 1999 +0000
+++ b/sys/netinet/ip_output.c   Mon Dec 20 15:48:26 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_output.c,v 1.58.2.1 1999/06/22 17:05:50 perry Exp $ */
+/*     $NetBSD: ip_output.c,v 1.58.2.2 1999/12/20 15:48:26 he Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1233,6 +1233,9 @@
        struct mbuf *copym;
 
        copym = m_copy(m, 0, M_COPYALL);
+        if (copym != NULL
+        && (copym->m_flags & M_EXT || copym->m_len < sizeof(struct ip)))
+               copym = m_pullup(copym, sizeof(struct ip));
        if (copym != NULL) {
                /*
                 * We don't bother to fragment if the IP length is greater



Home | Main Index | Thread Index | Old Index