public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.14-rc2] aoe [1/3]: explicitly set minimum packet length to ETH_ZLEN
@ 2005-09-29 16:45 Ed L. Cashin
  2005-09-29 16:47 ` [PATCH 2.6.14-rc2] aoe [2/3]: use get_unaligned for accesses in ATA id buffer Ed L. Cashin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ed L. Cashin @ 2005-09-29 16:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: ecashin, Greg K-H

Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com>

Explicitly set the minimum packet length to ETH_ZLEN and zero the
packet data.

diff -u 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c
--- 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c	2005-09-29 12:01:55.000000000 -0400
+++ 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c	2005-09-29 12:01:56.000000000 -0400
@@ -20,6 +20,9 @@
 {
 	struct sk_buff *skb;
 
+	if (len < ETH_ZLEN)
+		len = ETH_ZLEN;
+
 	skb = alloc_skb(len, GFP_ATOMIC);
 	if (skb) {
 		skb->nh.raw = skb->mac.raw = skb->data;
@@ -27,6 +30,7 @@
 		skb->protocol = __constant_htons(ETH_P_AOE);
 		skb->priority = 0;
 		skb_put(skb, len);
+		memset(skb->head, 0, len);
 		skb->next = skb->prev = NULL;
 
 		/* tell the network layer not to perform IP checksums


-- 
  Ed L. Cashin <ecashin@coraid.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-09-30 17:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-29 16:45 [PATCH 2.6.14-rc2] aoe [1/3]: explicitly set minimum packet length to ETH_ZLEN Ed L. Cashin
2005-09-29 16:47 ` [PATCH 2.6.14-rc2] aoe [2/3]: use get_unaligned for accesses in ATA id buffer Ed L. Cashin
2005-09-29 16:47 ` [PATCH 2.6.14-rc2] aoe [3/3]: update to version 14 Ed L. Cashin
2005-09-29 22:21 ` [PATCH 2.6.14-rc2] aoe [1/3]: explicitly set minimum packet length to ETH_ZLEN Alan Cox
2005-09-29 22:31   ` Ed L Cashin
2005-09-29 23:45     ` David S. Miller
2005-09-30 16:58       ` Ed L Cashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox