summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2012-03-23 13:25:31 -0700
committerJesse Gross <jesse@nicira.com>2012-03-23 16:01:12 -0700
commit11460e2316b88f0bd0ea0005d94338d800ea16bd (patch)
tree1c4a83564b0b7f99d0acc9ae0de7a09922d02627 /lib
parent9c47b45a3bb56009bf2553c493d097eeadd7e5c2 (diff)
downloadopenvswitch-11460e2316b88f0bd0ea0005d94338d800ea16bd.tar.gz
flow: 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. Bug #10194 Reported-by: Michael Mao <mmao@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/dpif-netdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index d73050a34..a38e56bbe 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -976,7 +976,8 @@ dp_netdev_flow_used(struct dp_netdev_flow *flow, struct flow *key,
flow->used = time_msec();
flow->packet_count++;
flow->byte_count += packet->size;
- if (key->dl_type == htons(ETH_TYPE_IP) &&
+ if ((key->dl_type == htons(ETH_TYPE_IP) ||
+ key->dl_type == htons(ETH_TYPE_IPV6)) &&
key->nw_proto == IPPROTO_TCP && packet->l7) {
struct tcp_header *th = packet->l4;
flow->tcp_ctl |= th->tcp_ctl;