summaryrefslogtreecommitdiff
path: root/datapath
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@ovn.org>2016-03-03 16:15:40 -0800
committerPravin B Shelar <pshelar@ovn.org>2016-03-03 16:15:40 -0800
commitc26d70a2452ad0d7a13b72c94641d08001283119 (patch)
tree080c7aed3108afaf688519cecafbebe263df1512 /datapath
parentc391558c30d7d7eb5c20da3ba0cd4700b6890962 (diff)
downloadopenvswitch-c26d70a2452ad0d7a13b72c94641d08001283119.tar.gz
datapath: STT: Fix checksum handling.
On packet receive STT verifies the checksum if not done in hardware. But IP and TCP were pulled before the verification step. The verification expect to see packet with TCP header. This causes STT to drop packet in certain cases. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Joe Stringer <joe@ovn.org>
Diffstat (limited to 'datapath')
-rw-r--r--datapath/linux/compat/stt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
index 5b6857717..eb397e85b 100644
--- a/datapath/linux/compat/stt.c
+++ b/datapath/linux/compat/stt.c
@@ -1347,6 +1347,7 @@ static void stt_rcv(struct stt_dev *stt_dev, struct sk_buff *skb)
if (unlikely(!validate_checksum(skb)))
goto drop;
+ __skb_pull(skb, sizeof(struct tcphdr));
skb = reassemble(skb);
if (!skb)
return;
@@ -1490,7 +1491,7 @@ static unsigned int nf_ip_hook(FIRST_PARAM, struct sk_buff *skb, LAST_PARAM)
if (!stt_dev)
return NF_ACCEPT;
- __skb_pull(skb, ip_hdr_len + sizeof(struct tcphdr));
+ __skb_pull(skb, ip_hdr_len);
stt_rcv(stt_dev, skb);
return NF_STOLEN;
}