[ovs-dev] [PATCH branch-2.0] ofproto: Avoid segfault modifying flow with invalid meter.
Jarno Rajahalme
jrajahalme at nicira.com
Tue Jan 14 20:57:19 UTC 2014
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>
On Jan 10, 2014, at 11:19 AM, Ben Pfaff <blp at nicira.com> wrote:
> 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
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list