fletcher checksum

Peter Lieven pli at peering.eu
Tue Apr 27 16:48:38 CEST 2010


>> 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.
>
>   

I'm totally not in sync with this thread, but are you sure,
that you really want to do a modulo 255 operation and
not modulo 256 ( & 0xff ) here?



More information about the Bird-users mailing list