diff options
author | paul <paul> | 2004-05-31 14:16:54 +0000 |
---|---|---|
committer | paul <paul> | 2004-05-31 14:16:54 +0000 |
commit | 0c2be26c735870c28ec7985ca1d24d96ae63ae45 (patch) | |
tree | a9bcbdbb3e46be5e2d335461fdf9c2c73a0ab505 /ospfd/ospf_lsa.c | |
parent | dc0b5ce220387b3982d7120ce2273a9094e6a778 (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_lsa.c')
-rw-r--r-- | ospfd/ospf_lsa.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 4711f0fe..b7550b13 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -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); } |