r8169: fix checksum broken

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>

authored by Shan Wei and committed by David S. Miller d5d3ebe3 218854af

+1 -2
+1 -2
drivers/net/r8169.c
··· 4440 4440 u32 status = opts1 & RxProtoMask; 4441 4441 4442 4442 if (((status == RxProtoTCP) && !(opts1 & TCPFail)) || 4443 - ((status == RxProtoUDP) && !(opts1 & UDPFail)) || 4444 - ((status == RxProtoIP) && !(opts1 & IPFail))) 4443 + ((status == RxProtoUDP) && !(opts1 & UDPFail))) 4445 4444 skb->ip_summed = CHECKSUM_UNNECESSARY; 4446 4445 else 4447 4446 skb_checksum_none_assert(skb);