diff options
author | Ferry Huberts <ferry.huberts@pelagic.nl> | 2015-04-24 14:43:14 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2015-05-03 17:30:47 +0200 |
commit | d8b204e4e7f158eb12ec1755af084c31b713dcb7 (patch) | |
tree | 1b88e56e70d5cab062cc316ab67fe5257805ae17 /print-olsr.c | |
parent | 133210641826903c11f51094310476e7df77c9fc (diff) | |
download | tcpdump-d8b204e4e7f158eb12ec1755af084c31b713dcb7.tar.gz |
olsr: fix 'Advertised networks' count
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Diffstat (limited to 'print-olsr.c')
-rw-r--r-- | print-olsr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/print-olsr.c b/print-olsr.c index 9b92a0b7..de8e7320 100644 --- a/print-olsr.c +++ b/print-olsr.c @@ -495,12 +495,14 @@ olsr_print(netdissect_options *ndo, } case OLSR_HNA_MSG: - ND_PRINT((ndo, "\n\t Advertised networks (total %u)", - (unsigned int) (msg_tlen / sizeof(struct olsr_hna6)))); #if INET6 if (is_ipv6) { int i = 0; + + ND_PRINT((ndo, "\n\t Advertised networks (total %u)", + (unsigned int) (msg_tlen / sizeof(struct olsr_hna6)))); + while (msg_tlen >= sizeof(struct olsr_hna6)) { const struct olsr_hna6 *hna6; @@ -520,6 +522,10 @@ olsr_print(netdissect_options *ndo, #endif { int col = 0; + + ND_PRINT((ndo, "\n\t Advertised networks (total %u)", + (unsigned int) (msg_tlen / sizeof(struct olsr_hna4)))); + while (msg_tlen >= sizeof(struct olsr_hna4)) { ND_TCHECK2(*msg_data, sizeof(struct olsr_hna4)); |