From: Denis Ovsienko Date: Tue, 11 Jun 2013 20:52:09 +0000 (+0400) Subject: OpenFlow 1.0: fix OFPST_QUEUE decoding bug X-Git-Tag: tcpdump-4.5.0~73^2~5 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/00ac5be4b6d44af1750c93ff30656972a6269ff0 OpenFlow 1.0: fix OFPST_QUEUE decoding bug The while loop in of10_queue_stats_reply_print() decremented the remaining length by 104 instead of 32. As soon as that happened the decoding didn't proceed/stop in a normal way and was likely to hit snapend. Fixed. --- diff --git a/print-openflow-1.0.c b/print-openflow-1.0.c index 3f6b77f9..46e758b9 100644 --- a/print-openflow-1.0.c +++ b/print-openflow-1.0.c @@ -1428,7 +1428,7 @@ of10_queue_stats_reply_print(const u_char *cp, const u_char *ep, u_int len) { printf(", tx_errors %" PRIu64, EXTRACT_64BITS(cp)); cp += 8; - len -= sizeof(struct ofp_port_stats); + len -= sizeof(struct ofp_queue_stats); } /* while */ return cp;