]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix some corner cases in dev_can_checksum()
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 22 Oct 2010 04:12:19 +0000 (04:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Oct 2010 18:37:29 +0000 (11:37 -0700)
commit0ebf0c8f520b78990d0056659c487a5999def810
tree0b34c62feeda057f5cb7233875b2b14b4228b2f1
parentcf6f561f7d4a9d74e933494634022df341ca2d97
net: Fix some corner cases in dev_can_checksum()

dev_can_checksum() incorrectly returns true in these cases:

1. The skb has both out-of-band and in-band VLAN tags and the device
   supports checksum offload for the encapsulated protocol but only with
   one layer of encapsulation.
2. The skb has a VLAN tag and the device supports generic checksumming
   but not in conjunction with VLAN encapsulation.

Rearrange the VLAN tag checks to avoid these.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c