[ovs-dev] [PATCH] ofp-util: Ignore out_group in flow_mods for commands other than delete.

Ben Pfaff blp at nicira.com
Tue Jan 21 17:53:54 UTC 2014


Applied, thanks!

On Wed, Jan 08, 2014 at 01:41:38PM -0800, Alex Wang wrote:
> Looks good to me,
> 
> 
> On Thu, Dec 5, 2013 at 9:29 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> > OpenFlow 1.1 through 1.4 say that the out_group in a flow_mod, for commands
> > other than OFPFC_DELETE or OFPFC_DELETE_STRICT, should be ignored.  OVS
> > actually reported an error.  This fixes the problem.
> >
> > Reported-by: chen zhang <3zhangchen9211 at gmail.com>
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> >  AUTHORS        |    1 +
> >  lib/ofp-util.c |   10 ++++------
> >  2 files changed, 5 insertions(+), 6 deletions(-)
> >
> > diff --git a/AUTHORS b/AUTHORS
> > index 1c2d9ea..b1333ef 100644
> > --- a/AUTHORS
> > +++ b/AUTHORS
> > @@ -238,6 +238,7 @@ Yeming Zhao             zhaoyeming at gmail.com
> >  Ying Chen               yingchen at vmware.com
> >  Yongqiang Liu           liuyq7809 at gmail.com
> >  ankur dwivedi           ankurengg2003 at gmail.com
> > +chen zhang              3zhangchen9211 at gmail.com
> >  kk yap                  yapkke at stanford.edu
> >  likunyun                kunyunli at hotmail.com
> >  rahim entezari          rahim.entezari at gmail.com
> > diff --git a/lib/ofp-util.c b/lib/ofp-util.c
> > index 7fc4c7c..709d85a 100644
> > --- a/lib/ofp-util.c
> > +++ b/lib/ofp-util.c
> > @@ -1559,13 +1559,11 @@ ofputil_decode_flow_mod(struct ofputil_flow_mod
> > *fm,
> >          if (error) {
> >              return error;
> >          }
> > -        fm->out_group = ntohl(ofm->out_group);
> >
> > -        if ((ofm->command == OFPFC_DELETE
> > -             || ofm->command == OFPFC_DELETE_STRICT)
> > -            && ofm->out_group != htonl(OFPG_ANY)) {
> > -            return OFPERR_OFPFMFC_UNKNOWN;
> > -        }
> > +        fm->out_group = (ofm->command == OFPFC_DELETE ||
> > +                         ofm->command == OFPFC_DELETE_STRICT
> > +                         ? ntohl(ofm->out_group)
> > +                         : OFPG11_ANY);
> >          raw_flags = ofm->flags;
> >      } else {
> >          uint16_t command;
> > --
> > 1.7.10.4
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
> >



More information about the dev mailing list