netdev
[Top] [All Lists]

[PATCH][ATM]: br2684 incorrectly handles frames recvd with FCS (by Alex

To: davem@xxxxxxxxxx
Subject: [PATCH][ATM]: br2684 incorrectly handles frames recvd with FCS (by Alex Zeffertt <ajz@cambridgebroadband.com>)
From: chas williams (contractor) <chas@xxxxxxxxxxxxxxxx>
Date: Thu, 08 Jan 2004 11:58:40 -0500
Cc: netdev@xxxxxxxxxxx, ajz@xxxxxxxxxxxxxxxxxxxxxx
Reply-to: chas3@xxxxxxxxxxxxxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
please apply to 2.6 (and 2.4 as well!)

thanks

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.1492  -> 1.1493 
#           net/atm/br2684.c    1.9     -> 1.10   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 04/01/07      chas@xxxxxxxxxxxxxxxxxxxxxx     1.1493
# [ATM]: br2684 incorrectly handles frames recvd with FCS (by Alex Zeffertt 
<ajz@xxxxxxxxxxxxxxxxxxxxxx>)
# --------------------------------------------
#
diff -Nru a/net/atm/br2684.c b/net/atm/br2684.c
--- a/net/atm/br2684.c  Wed Jan  7 13:23:54 2004
+++ b/net/atm/br2684.c  Wed Jan  7 13:23:54 2004
@@ -437,6 +437,10 @@
                        dev_kfree_skb(skb);
                        return;
                }
+
+               /* Strip FCS if present */
+               if (skb->len > 7 && skb->data[7] == 0x01)
+                       __skb_trim(skb, skb->len - 4);
        } else {
                plen = PADLEN + ETH_HLEN;       /* pad, dstmac,srcmac, ethtype 
*/
                /* first 2 chars should be 0 */

<Prev in Thread] Current Thread [Next in Thread>