Handle modify and delete commands in OpenFlow1.4 flow monitor requests. These commands are not yet allowed by the decoder which will be updated by a subsequent patch.
Signed-off-by: Simon Horman <ho...@verge.net.au> --- v2 * No change --- ofproto/ofproto.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index fb1e7c0..4ac4fa9 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -4970,12 +4970,23 @@ handle_flow_monitor_request(struct ofconn *ofconn, const struct ofp_header *oh) goto error; } - error = ofmonitor_create(&request, ofconn, &m); - if (error) { - goto error; + if (request.command == OFPFMC14_DELETE || + request.command == OFPFMC14_MODIFY) { + error = flow_monitor_delete(ofconn, request.id); + if (error) { + goto error; + } } - list_insert(&monitor_list, &m->list_node); + if (request.command == OFPFMC14_ADD || + request.command == OFPFMC14_MODIFY) { + error = ofmonitor_create(&request, ofconn, &m); + if (error) { + goto error; + } + + list_insert(&monitor_list, &m->list_node); + } } rule_collection_init(&rules); -- 2.0.0.rc2 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev