From: Ben Pfaff Date: Thu, 20 Jan 2011 20:27:34 +0000 (-0800) Subject: ofproto: Fix bug in "trace" command. X-Git-Tag: v1.1.0~465 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=11e6a15bdf78f83e7c10e0f3737c159f92ed3897;p=sliver-openvswitch.git ofproto: Fix bug in "trace" command. tun_id is a 64-bit field but it was being treated here as a 32-bit field. --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 2eae86dd8..e081e32e9 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);