[Top] [All Lists]

Re: [PATCH 2.6.12-rc1-mm1] net/ethernet/eth.c - eth_header

To: Vicente Feito <vicente.feito@xxxxxxxxx>
Subject: Re: [PATCH 2.6.12-rc1-mm1] net/ethernet/eth.c - eth_header
From: Jeff Garzik <jgarzik@xxxxxxxxx>
Date: Wed, 23 Mar 2005 15:50:25 -0500
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <>
References: <>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922
Vicente Feito wrote:
Please consider applying (or droping).
Thank you.

Description: This patch prevent drivers from calling eth_header with a 802.3
frame using a len>1536. In such a case returns -EINVAL, which was hard to
choose because the ETH_HLEN is supposed to return.

Signed-off-by: Vicente Feito <vicente.feito@xxxxxxxxx>


--- linux-2.6.12-rc1-mm1/net/ethernet/eth.c.orig 2005-03-22 12:49:08.000000000 +0000
+++ linux-2.6.12-rc1-mm1/net/ethernet/eth.c 2005-03-22 12:49:36.000000000 +0000
@@ -78,6 +78,8 @@ int eth_header(struct sk_buff *skb, stru
struct ethhdr *eth = (struct ethhdr *)skb_push(skb,ETH_HLEN);
+ if (type == ETH_P_802_3 && len >= 1536)
+ return -EINVAL;

Why? Won't this break for jumbo frames?


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