On Fri, Apr 23, 2010 at 04:12:27PM +0200, Joakim Tjernlund wrote: > > As i looked on the Fletcher checksum, it seems that you cannot just swap > > the result instead of swapping the checked data. > > Then there is a bug else where. Fletcher as such does not > depend on host endian. It operates on bytes and those are > always the same endian.
But it also takes in consideration the position of the bytes. If you put endianity-swapped data into it, you have a different byte sequence, and the algorithm returns a different result. > Did you try my patch? I looked at the Fletcher algorithm and found that it wouldn't work (because of the reason above). Perhaps i should try it to prove that. > > > Quagga does NOT do what BIRD does and it works as it should. > > > > Berhaps Quagga stores the LSAs in the network endianity (big endian) and > > BIRD stores the LSAs in the host endianity? > > Quagga does store its own LSAs in Big Endian, you have to make > them BE before transmitting them anyway so you might as well store > them directly in BE. But you also need LSAs in host endianity when doing SPF calculation. Although it would be probably possible to change SPF calculation to use directly BE values it would be huge work and it is questionable whether it wouldn't just move endianity swaps deeper in the code. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santi...@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."
signature.asc
Description: Digital signature