From 40893fd0fd4e0eda8c6a53db6a8e6013b2d44c16 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Tue, 26 Mar 2013 23:11:22 +0000 Subject: net: switch to use skb_probe_transport_header() Switch to use the new help skb_probe_transport_header() to do the l4 header probing for untrusted sources. For packets with partial csum, the header should already been set by skb_partial_csum_set(). Cc: Eric Dumazet Signed-off-by: Jason Wang Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- drivers/net/xen-netback/netback.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'drivers/net/xen-netback') diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index fc8faa74b250..83905a97c56c 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -39,7 +39,6 @@ #include #include -#include #include #include @@ -1506,14 +1505,7 @@ static void xen_netbk_tx_submit(struct xen_netbk *netbk) continue; } - if (!skb_transport_header_was_set(skb)) { - struct flow_keys keys; - - 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); vif->dev->stats.rx_bytes += skb->len; vif->dev->stats.rx_packets++; -- cgit v1.2.3-58-ga151