The flow that created the netdev_flow might have wildcarded TCP flags, or it may not be a TCP flow at all. Fix this by using the freshly extracted flow key to parse TCP flags.
Signed-off-by: Jarno Rajahalme <[email protected]> --- lib/dpif-netdev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 3bbfd2a..827e8ae 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -1703,13 +1703,14 @@ dp_netdev_set_threads(struct dp_netdev *dp, int n) static void dp_netdev_flow_used(struct dp_netdev_flow *netdev_flow, - const struct ofpbuf *packet) + const struct ofpbuf *packet, + const struct flow *key) OVS_REQUIRES(netdev_flow->mutex) { netdev_flow->used = time_msec(); netdev_flow->packet_count++; netdev_flow->byte_count += packet->size; - netdev_flow->tcp_flags |= packet_get_tcp_flags(packet, &netdev_flow->flow); + netdev_flow->tcp_flags |= packet_get_tcp_flags(packet, key); } static void @@ -1729,7 +1730,7 @@ dp_netdev_port_input(struct dp_netdev *dp, struct ofpbuf *packet, struct dp_netdev_actions *actions; ovs_mutex_lock(&netdev_flow->mutex); - dp_netdev_flow_used(netdev_flow, packet); + dp_netdev_flow_used(netdev_flow, packet, &key); actions = dp_netdev_actions_ref(netdev_flow->actions); ovs_mutex_unlock(&netdev_flow->mutex); -- 1.7.10.4 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
