OSPF performance/SPF calculations

Joakim Tjernlund joakim.tjernlund at transmode.se
Fri Apr 23 16:12:27 CEST 2010


Ondrej Zajicek <santiago at crfreenet.org> wrote on 2010/04/23 16:09:00:
>
> On Fri, Apr 23, 2010 at 10:54:33AM +0200, Joakim Tjernlund wrote:
> > > Removing of endianity swap is correct only if the Fletcher checksum
> > > would return the same value regardless of endianity swap. Is this
> > > a property of the Fletcher checksum? I don't see that.
> >
> > Assuming the LSA's are in the same endian(Big Endian) the sum should
> > be the same. You might have to swap the sum before returning it to the caller.
>
> 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.

Did you try my patch?

>
> > 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. Then one can use the same code to manage common LSA
parts for both received LSAs and your own LSAs.

     Jocke




More information about the Bird-users mailing list