fletcher checksum
Joakim Tjernlund
joakim.tjernlund at transmode.se
Tue Apr 27 16:39:37 CEST 2010
>
> On Mon, Apr 26, 2010 at 11:27:46AM +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;
It is in one of my patches.
Jocke
More information about the Bird-users
mailing list