net: Fix drivers advertising HW_CSUM feature to use csum_start
Some drivers are using skb_transport_offset(skb) instead of skb->csum_start for NETIF_F_HW_CSUM offload. This does not matter now, but if someone implements checksumming of encapsulated packets then this will break silently. TSO output paths are left as they are, since they are for IP+TCP only (might be worth converting though). Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
55508d601d
commit
0d0b16727f
@@ -2078,7 +2078,7 @@ static int atl1c_tso_csum(struct atl1c_adapter *adapter,
|
||||
check_sum:
|
||||
if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
|
||||
u8 css, cso;
|
||||
cso = skb_transport_offset(skb);
|
||||
cso = skb_checksum_start_offset(skb);
|
||||
|
||||
if (unlikely(cso & 0x1)) {
|
||||
if (netif_msg_tx_err(adapter))
|
||||
|
Reference in New Issue
Block a user