projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c7eacf
)
openvswitch: Read tcp flags only then the tranport header is present.
author
Jarno Rajahalme
<jrajahalme@nicira.com>
Sun, 16 Feb 2014 01:37:45 +0000
(17:37 -0800)
committer
Jesse Gross
<jesse@nicira.com>
Sun, 16 Feb 2014 01:37:45 +0000
(17:37 -0800)
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>
net/openvswitch/flow.c
patch
|
blob
|
blame
|
history
diff --git
a/net/openvswitch/flow.c
b/net/openvswitch/flow.c
index 16f4b46161d4fe2b806a46e895aa46922e2ce038..d71e60fa28cb7b4f634a37c84e8b575c9eedecce 100644
(file)
--- 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));