Skip to content
  • Ben Pfaff's avatar
    Fix treatment of OpenFlow 1.1+ bucket weights. · b82ef59d
    Ben Pfaff authored
    
    
    Until now, OVS has parsed all OF1.1+ group buckets that lack a weight
    as having weight 1.  Unfortunately, OpenFlow says that only "select"
    groups may have a nonzero weight, and requires reporting an error for
    other kinds of groups that have a nonzero weight.  This commit fixes
    the problem by parsing only select groups with a default weight of 1
    and other groups with a default weight of 0.  It also adds the
    OpenFlow-required check for nonzero weights for other kinds of groups.
    
    This complies with OpenFlow 1.1 and later.  OF1.1 says in section 5.8:
    
        If a specified group type is invalid (ie: includes fields such as
        weight that are undefined for the specified group type) then 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.
    
    Found by OFTest.
    
    Signed-off-by: default avatarBen Pfaff <blp@nicira.com>
    Acked-by: default avatarFlavio Leitner <fbl@sysclose.org>
    b82ef59d