]> The Tcpdump Group git mirrors - tcpdump/commitdiff
IEEE 802.15.4: Fix printing the pending extended address list
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 17 Jun 2020 12:19:33 +0000 (14:19 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 17 Jun 2020 12:54:11 +0000 (14:54 +0200)
Fix an index.
Fix a probably copy & paste error.

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("]");
        }
                }
                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 +
                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("]");
                        ND_PRINT(" ");
                }
                ND_PRINT("]");