From 6a270cd93d02a88709e7292684db47552b630abf Mon Sep 17 00:00:00 2001 From: Jingjing Duan Date: Wed, 13 Aug 2008 19:09:10 +0100 Subject: [ospfd/isisd] Switch to lib/ Fletcher checksum, fixing bug in isisd 2008-08-13 Jingjing Duan * ospfd/: Remove the old checksum implementation and use the consolidated version. * isisd/: ditto, thus fixing isisd checksuming on big-endian. Signed-off-by: Paul Jakma --- isisd/isis_pdu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'isisd/isis_pdu.c') diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index 6fcc5ed5..4311a905 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -32,6 +32,7 @@ #include "hash.c" #include "prefix.h" #include "if.h" +#include "checksum.h" #include "isisd/dict.h" #include "isisd/include-netbsd/iso.h" @@ -1121,7 +1122,7 @@ dontcheckadj: if (isis->debugs & DEBUG_UPDATE_PACKETS) zlog_debug ("LSP LEN: %d", ntohs (lsp->lsp_header->pdu_len)); - iso_csum_create (STREAM_DATA (lsp->pdu) + 12, + fletcher_checksum (STREAM_DATA (lsp->pdu) + 12, ntohs (lsp->lsp_header->pdu_len) - 12, 12); ISIS_FLAGS_SET_ALL (lsp->SRMflags); if (isis->debugs & DEBUG_UPDATE_PACKETS) @@ -1164,7 +1165,7 @@ dontcheckadj: /* 7.3.16.1 */ lsp->lsp_header->seq_num = htonl (ntohl (hdr->seq_num) + 1); - iso_csum_create (STREAM_DATA (lsp->pdu) + 12, + fletcher_checksum (STREAM_DATA (lsp->pdu) + 12, ntohs (lsp->lsp_header->pdu_len) - 12, 12); ISIS_FLAGS_SET_ALL (lsp->SRMflags); -- cgit v1.2.1