diff options
author | Jesse Gross <jesse@nicira.com> | 2012-04-02 15:13:36 -0700 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2012-04-02 15:13:36 -0700 |
commit | c55177e3e1e8a89d9d810d95ac18cb104865322c (patch) | |
tree | 82fc19bccd03a2ec0c2139d651f61ecd33a08987 /net | |
parent | bf32fecdc1851ad9ca960f56771b798d17c26cf1 (diff) |
openvswitch: Enable retrieval of TCP flags from IPv6 traffic.
We currently check that a packet is IPv4 and TCP before fetching the
TCP flags. This enables fetching from IPv6 packets as well.
Reported-by: Michael Mao <mmao@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/openvswitch/flow.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index 2a11ec2383ee..c6e1dae8a5ee 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c @@ -182,7 +182,8 @@ void ovs_flow_used(struct sw_flow *flow, struct sk_buff *skb) { u8 tcp_flags = 0; - if (flow->key.eth.type == htons(ETH_P_IP) && + if ((flow->key.eth.type == htons(ETH_P_IP) || + flow->key.eth.type == htons(ETH_P_IPV6)) && flow->key.ip.proto == IPPROTO_TCP && likely(skb->len >= skb_transport_offset(skb) + sizeof(struct tcphdr))) { u8 *tcp = (u8 *)tcp_hdr(skb); |