]> git.ipfire.org Git - people/arne_f/kernel.git/commit
tuntap: set transport header before passing it to kernel
authorJason Wang <jasowang@redhat.com>
Mon, 25 Mar 2013 20:19:56 +0000 (20:19 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jun 2013 17:39:07 +0000 (10:39 -0700)
commit6f23cbca260db299e3c2debcbfbd9c928bf79707
tree7a61f4c3559a579263824223b90c63d6b8570725
parentaf7a606afaf5863914b32883d529ca27b4795eee
tuntap: set transport header before passing it to kernel

[ Upstream commit 38502af77e07b5d6650b9ff99a0b482d86366592 ]

Currently, for the packets receives from tuntap, before doing header check,
kernel just reset the transport header in netif_receive_skb() which pretends no
l4 header. This is suboptimal for precise packet length estimation (introduced
in 1def9238) which needs correct l4 header for gso packets.

So this patch set the transport header to csum_start for partial checksum
packets, otherwise it first try skb_flow_dissect(), if it fails, just reset the
transport header.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/tun.c