summaryrefslogtreecommitdiff
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 48cd73a2dc55..29538e6e914d 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -70,7 +70,6 @@
#include <net/sock.h>
#include <asm/uaccess.h>
-#include <net/flow_keys.h>
/* Uncomment to enable debugging */
/* #define TUN_DEBUG 1 */
@@ -1050,7 +1049,6 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
bool zerocopy = false;
int err;
u32 rxhash;
- struct flow_keys keys;
if (!(tun->flags & TUN_NO_PI)) {
if ((len -= sizeof(pi)) > total_len)
@@ -1205,13 +1203,7 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
}
skb_reset_network_header(skb);
-
- if (skb->ip_summed == CHECKSUM_PARTIAL)
- skb_set_transport_header(skb, skb_checksum_start_offset(skb));
- else if (skb_flow_dissect(skb, &keys))
- skb_set_transport_header(skb, keys.thoff);
- else
- skb_reset_transport_header(skb);
+ skb_probe_transport_header(skb, 0);
rxhash = skb_get_rxhash(skb);
netif_rx_ni(skb);