Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/ic Pull up revision 1.27 (requested by tsutsui):



details:   https://anonhg.NetBSD.org/src/rev/7648546159f2
branches:  netbsd-1-5
changeset: 490731:7648546159f2
user:      he <he%NetBSD.org@localhost>
date:      Mon Feb 26 21:19:32 2001 +0000

description:
Pull up revision 1.27 (requested by tsutsui):
  Don't copy Rx packet to mbuf if it has invalid length; just
  discard.  Fixes PR#11877.

diffstat:

 sys/dev/ic/rtl81x9.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 1e0c1e518775 -r 7648546159f2 sys/dev/ic/rtl81x9.c
--- a/sys/dev/ic/rtl81x9.c      Mon Feb 26 21:16:35 2001 +0000
+++ b/sys/dev/ic/rtl81x9.c      Mon Feb 26 21:19:32 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtl81x9.c,v 1.11.4.2 2001/01/25 07:23:10 jhawk Exp $   */
+/*     $NetBSD: rtl81x9.c,v 1.11.4.3 2001/02/26 21:19:32 he Exp $      */
 
 /*
  * Copyright (c) 1997, 1998
@@ -1003,7 +1003,8 @@
                if (total_len == RTK_RXSTAT_UNFINISHED)
                        break;
 
-               if ((rxstat & RTK_RXSTAT_RXOK) == 0) {
+               if ((rxstat & RTK_RXSTAT_RXOK) == 0 ||
+                   total_len > ETHER_MAX_LEN) {
                        ifp->if_ierrors++;
 
                        /*



Home | Main Index | Thread Index | Old Index