[ovs-dev] [PATCH branch-2.0] ofproto: Avoid segfault modifying flow with invalid meter.
Ben Pfaff
blp at nicira.com
Fri Jan 10 19:19:07 UTC 2014
ofproto_check_ofpacts() checks for a valid meter ID but ofpacts_check()
does not.
Reported-by: John Hurley <john.hurley at netronome.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
It looks like this bug is only present in OVS 2.0. I don't think
later versions have the same problem, and earlier versions didn't
have meters at all.
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 6eab14d..030ec58 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -3952,8 +3952,8 @@ modify_flows__(struct ofproto *ofproto, struct ofconn *ofconn,
}
/* Verify actions. */
- error = ofpacts_check(fm->ofpacts, fm->ofpacts_len, &fm->match.flow,
- u16_to_ofp(ofproto->max_ports), rule->table_id);
+ error = ofproto_check_ofpacts(ofproto, fm->ofpacts, fm->ofpacts_len,
+ &fm->match.flow, rule->table_id);
if (error) {
return error;
}
--
1.7.10.4
More information about the dev
mailing list