]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: fix packet checksum in receive path
authorMatthias Schiffer <mschiffer@universe-factory.net>
Tue, 23 Jan 2018 09:59:49 +0000 (10:59 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Sun, 25 Feb 2018 19:00:44 +0000 (20:00 +0100)
commitff866bf6a60b7a611ab27a188840beeb49b44495
treeb17c584aa8171f5001468f6932c3c7c6deb89696
parentbcac507057f6668c45308343ba41f4c91a086136
batman-adv: fix packet checksum in receive path

eth_type_trans() internally calls skb_pull(), which does not adjust the
skb checksum; skb_postpull_rcsum() is necessary to avoid log spam of the
form "bat0: hw csum failure" when packets with CHECKSUM_COMPLETE are
received.

Note that in usual setups, packets don't reach batman-adv with
CHECKSUM_COMPLETE (I assume NICs bail out of checksumming when they see
batadv's ethtype?), which is why the log messages do not occur on every
system using batman-adv. I could reproduce this issue by stacking
batman-adv on top of a VXLAN interface.

Fixes: b01d4991e36e ("net: Add batman-adv meshing protocol")
Tested-by: Maximilian Wilhelm <max@sdn.clinic>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/soft-interface.c