patch to kaweth.c to align IP header

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

 



All,

The Kawasaki LSI USB Ethernet driver was causing a crash
in ipt_do_table() on mips because the address fields in
the IP header were not word aligned.  Many (all?) other
ethernet drivers do an skb_reserve of 2 to word align
the address fields, and doing this in kaweth.c fixed
my crash.

kernel: 2.4.17
hardware: Netgear EA101 USB Ethernet

Quinn


diff -puN -r -X - linux/drivers/usb/kaweth.c linux.modified/drivers/usb/kaweth.c
--- linux/drivers/usb/kaweth.c	Tue Nov 13 10:19:41 2001
+++ linux.modified/drivers/usb/kaweth.c	Tue Sep  3 16:07:08 2002
@@ -514,6 +514,7 @@ static void kaweth_usb_receive(struct ur
 
 		skb->dev = net;
 
+		skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
 		eth_copy_and_sum(skb, kaweth->rx_buf + 2, pkt_len, 0);
 		
 		skb_put(skb, pkt_len);


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux