summaryrefslogtreecommitdiff
path: root/ospfd/ospf_dump.c
diff options
context:
space:
mode:
authorpaul <paul>2004-05-31 14:16:54 +0000
committerpaul <paul>2004-05-31 14:16:54 +0000
commit0c2be26c735870c28ec7985ca1d24d96ae63ae45 (patch)
treea9bcbdbb3e46be5e2d335461fdf9c2c73a0ab505 /ospfd/ospf_dump.c
parentdc0b5ce220387b3982d7120ce2273a9094e6a778 (diff)
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.c4
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));