]> The Tcpdump Group git mirrors - tcpdump/commitdiff
OpenFlow 1.0: fix OFPST_QUEUE decoding bug
authorDenis Ovsienko <[email protected]>
Tue, 11 Jun 2013 20:52:09 +0000 (00:52 +0400)
committerDenis Ovsienko <[email protected]>
Tue, 11 Jun 2013 20:52:09 +0000 (00:52 +0400)
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.

print-openflow-1.0.c

index 3f6b77f9b80d47fe1d61b2b8b93453fe0ccbc939..46e758b999724639e75a98b5ff284a3edd3a7701 100644 (file)
@@ -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;