From 0c2be26c735870c28ec7985ca1d24d96ae63ae45 Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 31 May 2004 14:16:54 +0000 Subject: 2004-05-31 Sagun Shakya * 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. --- ospfd/ospf_dump.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ospfd/ospf_dump.c') 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)); -- cgit v1.2.1