diff options
author | paul <paul> | 2004-05-31 14:16:54 +0000 |
---|---|---|
committer | paul <paul> | 2004-05-31 14:16:54 +0000 |
commit | 4baa37e83cc5f25c5d385748b518fec7764e6c0b (patch) | |
tree | 51c66bfeb36300b8ce96fee6d36c98b1c1f53c12 /ospfd/ospf_dump.c | |
parent | 8d846d1cb1125ba8dd19615d9f4fb7e08eb3bb84 (diff) | |
download | quagga-4baa37e83cc5f25c5d385748b518fec7764e6c0b.tar.bz2 quagga-4baa37e83cc5f25c5d385748b518fec7764e6c0b.tar.xz |
2004-05-31 Sagun Shakya <sagun.shakya@sun.com>
* ospf_dump.c: (ospf_lsa_header_dump) LOOKUP can return null if
index is out of range.
ospf_flood.c: endianness fix
ospf_lsa.c: Missing ntohl's on (struct lsa *)->data->ls_seqnum
in various places.
Diffstat (limited to 'ospfd/ospf_dump.c')
-rw-r--r-- | ospfd/ospf_dump.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index fe75a960..ccee1d6b 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -325,12 +325,14 @@ ospf_dd_flags_dump (u_char flags, char *buf, size_t size) void ospf_lsa_header_dump (struct lsa_header *lsah) { + char *lsah_type = LOOKUP (ospf_lsa_type_msg, lsah->type); + zlog_info (" LSA Header"); zlog_info (" LS age %d", ntohs (lsah->ls_age)); zlog_info (" Options %d (%s)", lsah->options, ospf_options_dump (lsah->options)); zlog_info (" LS type %d (%s)", lsah->type, - LOOKUP (ospf_lsa_type_msg, lsah->type)); + (lsah->type ? lsah->type : "unknown type")); zlog_info (" Link State ID %s", inet_ntoa (lsah->id)); zlog_info (" Advertising Router %s", inet_ntoa (lsah->adv_router)); zlog_info (" LS sequence number 0x%lx", (u_long)ntohl (lsah->ls_seqnum)); |