mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:39:28 +00:00
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.
This commit is contained in:
parent
dc0b5ce220
commit
0c2be26c73
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
2004-05-10 Hasso Tepper <hasso@estpak.ee>
|
||||
|
||||
* ospf_zebra.c, ospfd.c: Move ospf_prefix_list_update() function
|
||||
|
@ -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));
|
||||
|
@ -121,7 +121,7 @@ ospf_process_self_originated_lsa (struct ospf *ospf,
|
||||
if (IS_DEBUG_OSPF_EVENT)
|
||||
zlog_info ("LSA[Type%d:%s]: Process self-originated LSA seq 0x%lx",
|
||||
new->data->type, inet_ntoa (new->data->id),
|
||||
(u_long)new->data->ls_seqnum);
|
||||
ntohl(new->data->ls_seqnum));
|
||||
|
||||
/* If we're here, we installed a self-originated LSA that we received
|
||||
from a neighbor, i.e. it's more recent. We must see whether we want
|
||||
|
@ -2380,9 +2380,9 @@ ospf_router_lsa_install (struct ospf *ospf,
|
||||
area->router_lsa_self = ospf_lsa_lock (new);
|
||||
|
||||
if (IS_DEBUG_OSPF (lsa, LSA_INSTALL))
|
||||
zlog_info("LSA[Type%d]: ID %s seq 0x%x is self-originated",
|
||||
new->data->type, inet_ntoa (new->data->id),
|
||||
new->data->ls_seqnum);
|
||||
zlog_info("LSA[Type%d]: ID %s seq 0x%x is self-originated",
|
||||
new->data->type, inet_ntoa (new->data->id),
|
||||
ntohl(new->data->ls_seqnum));
|
||||
}
|
||||
|
||||
return new;
|
||||
@ -2652,12 +2652,13 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
|
||||
can be originated. "
|
||||
*/
|
||||
|
||||
if (lsa->data->ls_seqnum - 1 == htonl(OSPF_MAX_SEQUENCE_NUMBER))
|
||||
if (ntohl(lsa->data->ls_seqnum) - 1 == htonl(OSPF_MAX_SEQUENCE_NUMBER)
|
||||
{
|
||||
if (ospf_lsa_is_self_originated(ospf, lsa))
|
||||
{
|
||||
lsa->data->ls_seqnum = htonl(OSPF_MAX_SEQUENCE_NUMBER);
|
||||
if (!IS_LSA_MAXAGE(lsa))
|
||||
lsa->data->ls_seqnum = htonl(OSPF_MAX_SEQUENCE_NUMBER);
|
||||
|
||||
if (!IS_LSA_MAXAGE(lsa))
|
||||
lsa->flags |= OSPF_LSA_PREMATURE_AGE;
|
||||
lsa->data->ls_age = htons (OSPF_LSA_MAXAGE);
|
||||
|
||||
@ -2769,8 +2770,10 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
|
||||
(IS_LSA_MAXAGE (new) && !IS_LSA_SELF (new)))
|
||||
{
|
||||
if (IS_DEBUG_OSPF (lsa, LSA_INSTALL))
|
||||
zlog_info ("LSA[Type%d:%s]: Install LSA 0x%lx, MaxAge",
|
||||
new->data->type, inet_ntoa (new->data->id), (u_long)lsa);
|
||||
zlog_info ("LSA[Type%d:%s]: Install LSA 0x%p, MaxAge",
|
||||
new->data->type,
|
||||
inet_ntoa (new->data->id),
|
||||
lsa);
|
||||
ospf_lsa_maxage (ospf, lsa);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user