diff options
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r-- | ospfd/ospf_lsa.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index f453353d..8981b57f 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -182,8 +182,17 @@ 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. */ |