diff options
author | Shan Wei <shanwei@cn.fujitsu.com> | 2010-11-12 00:15:25 +0000 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2010-12-14 23:40:18 +0100 |
commit | fe590f17c1b2f22e5ce66d091bfb21fe5b59cac0 (patch) | |
tree | 304a94e1686440ee6a87e29ba24a5c159799c5a1 | |
parent | 6cf6d548763e7e751a3fe77d084999bd11587834 (diff) |
r8169: fix checksum broken
commit d5d3ebe3be5c5123f2d444e186717f45284151e2 upstream.
If r8196 received packets with invalid sctp/igmp(not tcp, udp) checksum, r8196 set skb->ip_summed
wit CHECKSUM_UNNECESSARY. This cause that upper protocol don't check checksum field.
I am not family with r8196 driver. I try to guess the meaning of RxProtoIP and IPFail.
RxProtoIP stands for received IPv4 packet that upper protocol is not tcp and udp.
!(opts1 & IPFail) is true means that driver correctly to check checksum in IPv4 header.
If it's right, I think we should not set ip_summed wit CHECKSUM_UNNECESSARY for my sctp packets
with invalid checksum.
If it's not right, please tell me.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | drivers/net/r8169.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 661109f7ce4..b99dd04710f 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -4463,8 +4463,7 @@ static inline void rtl8169_rx_csum(struct sk_buff *skb, u32 opts1) u32 status = opts1 & RxProtoMask; if (((status == RxProtoTCP) && !(opts1 & TCPFail)) || - ((status == RxProtoUDP) && !(opts1 & UDPFail)) || - ((status == RxProtoIP) && !(opts1 & IPFail))) + ((status == RxProtoUDP) && !(opts1 & UDPFail))) skb->ip_summed = CHECKSUM_UNNECESSARY; else skb->ip_summed = CHECKSUM_NONE; |