ofproto: Honour out_port of flow monitors
authorSimon Horman <horms@verge.net.au>
Fri, 13 Jun 2014 23:33:13 +0000 (08:33 +0900)
committerBen Pfaff <blp@nicira.com>
Mon, 23 Jun 2014 21:37:41 +0000 (14:37 -0700)
commitcdbdeedada0c1e13a6075debaa5b3ada99714176
tree4f407530172d1398df7290a93160aaebbe2c5874
parenta4fcb111ceb885becb6d02683d72658ea4e1a039
ofproto: Honour out_port of flow monitors

Previously the out_port of a flow monitor was
checked in ofmonitor_report() using ofoperation_has_out_port().

When ofoperation_has_out_port() was removed so was the call to
it in ofmonitor_report() thus flow monitor updates are longer
filtered on the out_port.

This restores filtering on the out_port by using
ofproto_rule_has_out_port to check the actions of the rule.
If the actions have been changed by a modify actions then
ofpacts_output_to_port() is also used to check the old actions.

This patch also adds a test to exercise out_ports for flow monitors.

This resolves what appears to be a regression introduced by
b20f4073eecd4761 ("ofproto: Do straightforward removal of asynchronous flow
operations.")

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/connmgr.c
ofproto/connmgr.h
ofproto/ofproto-provider.h
ofproto/ofproto.c
tests/ofproto.at