[ovs-dev] [PATCH] ofp-util: Use correct error for indirect group with more than one bucket.

Ben Pfaff blp at nicira.com
Thu Aug 20 00:42:14 UTC 2015


Thanks, I applied this to master.

On Thu, Aug 06, 2015 at 12:38:31PM -0700, Jarno Rajahalme wrote:
> Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>
> 
> > On Aug 5, 2015, at 9:59 PM, Ben Pfaff <blp at nicira.com> wrote:
> > 
> > OpenFlow 1.5 says:
> > 
> >    If the group-mod request specifies more than one bucket for a group of
> >    type Indirect, the switch must refuse to add the group entry and must
> >    send an ofp_error_msg with OFPET_GROUP_MOD_FAILED type and
> >    OFPGMFC_INVALID_GROUP code.
> > 
> > Older versions don't specify a particular error for this case, so we might
> > as well use it for older OpenFlow also.
> > 
> > Found by OFTest.
> > 
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > lib/ofp-util.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lib/ofp-util.c b/lib/ofp-util.c
> > index 06bd32e..0a5232d 100644
> > --- a/lib/ofp-util.c
> > +++ b/lib/ofp-util.c
> > @@ -8565,7 +8565,7 @@ ofputil_decode_group_mod(const struct ofp_header *oh,
> >     switch (gm->type) {
> >     case OFPGT11_INDIRECT:
> >         if (!list_is_singleton(&gm->buckets)) {
> > -            return OFPERR_OFPGMFC_OUT_OF_BUCKETS;
> > +            return OFPERR_OFPGMFC_INVALID_GROUP;
> >         }
> >         break;
> >     case OFPGT11_ALL:
> > -- 
> > 2.1.3
> > 
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
> 



More information about the dev mailing list