Looks Good.

On Thu, Feb 24, 2011 at 5:03 PM, Ben Pfaff <[email protected]> wrote:
> This might have saved us some time debugging.
> ---
>  ofproto/ofproto.c |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
> index 8af1814..b8e633f 100644
> --- a/ofproto/ofproto.c
> +++ b/ofproto/ofproto.c
> @@ -3537,7 +3537,16 @@ put_ofp_flow_stats(struct ofconn *ofconn, struct rule 
> *rule,
>  static bool
>  is_valid_table(uint8_t table_id)
>  {
> -    return table_id == 0 || table_id == 0xff;
> +    if (table_id == 0 || table_id == 0xff) {
> +        return true;
> +    } else {
> +        /* It would probably be better to reply with an error but there 
> doesn't
> +         * seem to be any appropriate value, so that might just be
> +         * confusing. */
> +        VLOG_WARN_RL(&rl, "controller asked for invalid table %"PRIu8,
> +                     table_id);
> +        return false;
> +    }
>  }
>
>  static int
> --
> 1.7.1
>
>
> _______________________________________________
> dev mailing list
> [email protected]
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
>

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev_openvswitch.org

Reply via email to