fletcher checksum
Ondrej Zajicek
santiago at crfreenet.org
Tue Apr 27 16:47:41 CEST 2010
On Tue, Apr 27, 2010 at 04:39:37PM +0200, Joakim Tjernlund wrote:
> > > I think I mentioned this in passing but the fletcher checksum impl.
> > > is fragile. Try changing "u16 length" to "u32 length" and watch it
> > > break for no apparent reason.
> >
> > Yes, i noticed that and will fix that. Thanks.
>
> You know what the fix is? a (int) type cast like so:
> x = (int)((length - LSA_CHECKSUM_OFFSET) * c0 - c1) % 255;
Yes, i noticed that.
--
Elen sila lumenn' omentielvo
Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20100427/8634226a/attachment-0001.asc>
More information about the Bird-users
mailing list