On Mon, Jul 30, 2012 at 11:03:00AM +0900, Simon Horman wrote:
> diff --git a/lib/ofp-util.c b/lib/ofp-util.c
> index a943b4e..b62d944 100644
> --- a/lib/ofp-util.c
> +++ b/lib/ofp-util.c
> @@ -2418,7 +2418,16 @@ ofputil_decode_switch_features(const struct ofp_header 
> *oh,
>          if (osf->capabilities & htonl(OFPC11_GROUP_STATS)) {
>              features->capabilities |= OFPUTIL_C_GROUP_STATS;
>          }
> -        features->actions = decode_action_bits(osf->actions, 
> of11_action_bits);
> +        switch ((enum ofp_version)oh->version) {
> +        case OFP11_VERSION:
> +        case OFP12_VERSION:
> +            features->actions = decode_action_bits(UINT32_MAX,
> +                                                   of11_action_bits);
> +            break;
> +        case OFP10_VERSION:
> +        default:
> +            NOT_REACHED();
> +        }
>      } else {
>          return OFPERR_OFPBRC_BAD_VERSION;
>      }

"sparse" pointed out:

../lib/ofp-util.c:2440:52: warning: incorrect type in argument 1 (different 
base types)
../lib/ofp-util.c:2440:52:    expected restricted __be32 [usertype] of_actions
../lib/ofp-util.c:2440:52:    got unsigned int

so I'm going to change UINT32_MAX to htonl(UINT32_MAX).
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to