[ovs-dev] [tun_id masks 1/2] ofproto: Fix bug in "trace" command.

Justin Pettit jpettit at nicira.com
Thu Jan 20 22:34:58 UTC 2011


Looks good.

--Justin


On Jan 20, 2011, at 12:28 PM, Ben Pfaff wrote:

> tun_id is a 64-bit field but it was being treated here as a 32-bit field.
> ---
> ofproto/ofproto.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
> index 2eae86d..e081e32 100644
> --- a/ofproto/ofproto.c
> +++ b/ofproto/ofproto.c
> @@ -5026,7 +5026,7 @@ ofproto_unixctl_trace(struct unixctl_conn *conn, const char *args_,
>     struct ds result;
>     struct flow flow;
>     uint16_t in_port;
> -    ovs_be32 tun_id;
> +    ovs_be64 tun_id;
>     char *s;
> 
>     ofpbuf_init(&packet, strlen(args) / 2);
> @@ -5048,7 +5048,7 @@ ofproto_unixctl_trace(struct unixctl_conn *conn, const char *args_,
>         goto exit;
>     }
> 
> -    tun_id = ntohl(strtoul(tun_id_s, NULL, 10));
> +    tun_id = htonll(strtoull(tun_id_s, NULL, 10));
>     in_port = ofp_port_to_odp_port(atoi(in_port_s));
> 
>     packet_s = ofpbuf_put_hex(&packet, packet_s, NULL);
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list