summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow.c
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-02-16 02:37:45 +0100
committerJesse Gross <jesse@nicira.com>2014-02-16 02:37:45 +0100
commit04382a3303c22b0c536fbd0c94c1f012f2b8ed60 (patch)
treec642b275abaa9a89be06630017a40cc4ee6aed70 /net/openvswitch/flow.c
parentovs: fix dp check in ovs_dp_reset_user_features (diff)
downloadlinux-04382a3303c22b0c536fbd0c94c1f012f2b8ed60.tar.xz
linux-04382a3303c22b0c536fbd0c94c1f012f2b8ed60.zip
openvswitch: Read tcp flags only then the tranport header is present.
Only the first IP fragment can have a TCP header, check for this. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/flow.c')
-rw-r--r--net/openvswitch/flow.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index 16f4b46161d4..d71e60fa28cb 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -73,6 +73,7 @@ void ovs_flow_stats_update(struct sw_flow *flow, struct sk_buff *skb)
if ((flow->key.eth.type == htons(ETH_P_IP) ||
flow->key.eth.type == htons(ETH_P_IPV6)) &&
+ flow->key.ip.frag != OVS_FRAG_TYPE_LATER &&
flow->key.ip.proto == IPPROTO_TCP &&
likely(skb->len >= skb_transport_offset(skb) + sizeof(struct tcphdr))) {
tcp_flags = TCP_FLAGS_BE16(tcp_hdr(skb));