]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-802_15_4.c
IEEE 802.15.4: Fix printing the pending extended address list
[tcpdump] / print-802_15_4.c
index b226f55c8ed19e8701bc8b524f58d2d71c31dd2a..cb0d76e86a1b28d7daf1bc5a19a6071f21f26dd7 100644 (file)
@@ -655,11 +655,11 @@ ieee802_15_4_print_pending_addresses(netdissect_options *ndo,
                }
                ND_PRINT("]");
        }
-       if (s_cnt != 0) {
+       if (e_cnt != 0) {
                ND_PRINT(", Extended address list = [ ");
                for(i = 0; i < e_cnt; i++) {
                        ieee802_15_4_print_addr(ndo, p + 1 + s_cnt * 2 +
-                                               e_cnt * 8, 8);
+                                               i * 8, 8);
                        ND_PRINT(" ");
                }
                ND_PRINT("]");