From: Ben Pfaff Date: Thu, 20 Jan 2011 20:27:34 +0000 (-0800) Subject: ofproto: Fix bug in "trace" command. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11e6a15bdf78f83e7c10e0f3737c159f92ed3897;p=openvswitch 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 2eae86dd..e081e32e 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);