diff options
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r-- | ospfd/ospf_lsa.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 8981b57f..7dab0ca0 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -182,17 +182,8 @@ ospf_lsa_checksum (struct lsa_header *lsa) u_char *buffer = (u_char *) &lsa->options; int options_offset = buffer - (u_char *) &lsa->ls_age; /* should be 2 */ -<<<<<<< HEAD:ospfd/ospf_lsa.c - x = (((int)length - LSA_CHECKSUM_OFFSET) * c0 - c1) % 255; - if (x <= 0) - x += 255; - y = 510 - c0 - x; - if (y > 255) - y -= 255; -======= /* Skip the AGE field */ u_int16_t len = ntohs(lsa->length) - options_offset; ->>>>>>> 41dc3488cf127a1e23333459a0c316ded67f7ff3:ospfd/ospf_lsa.c /* Checksum offset starts from "options" field, not the beginning of the lsa_header struct. The offset is 14, rather than 16. */ @@ -313,12 +304,7 @@ ospf_lsa_discard (struct ospf_lsa *lsa) struct lsa_header * ospf_lsa_data_new (size_t size) { - struct lsa_header *new; - - new = (struct lsa_header *) XMALLOC (MTYPE_OSPF_LSA_DATA, size); - memset (new, 0, size); - - return new; + return XCALLOC (MTYPE_OSPF_LSA_DATA, size); } /* Duplicate LSA data. */ @@ -513,7 +499,7 @@ link_info_set (struct stream *s, struct in_addr id, if (ret == OSPF_MAX_LSA_SIZE) { - zlog_warn ("%s: Out of space in LSA stream, left %ld, size %ld", + zlog_warn ("%s: Out of space in LSA stream, left %zd, size %zd", __func__, STREAM_REMAIN (s), STREAM_SIZE (s)); return 0; } @@ -1882,6 +1868,7 @@ ospf_lsa_translated_nssa_new (struct ospf *ospf, return new; } +#if 0 /* compare type-5 to type-7 * -1: err, 0: same, 1: different */ @@ -1918,6 +1905,7 @@ ospf_lsa_translated_nssa_compare (struct ospf_lsa *t7, struct ospf_lsa *t5) return LSA_REFRESH_IF_CHANGED; } +#endif /* Originate Translated Type-5 for supplied Type-7 NSSA LSA */ struct ospf_lsa * |