Re: IP cheksum and libnet_pblock_coalesce

"David Barroso" <[email protected]> Mon, 27 Sep 2004 21:13:01 +0200 (CEST)
Newsgroups gmane.comp.security.libnet
Message-ID <[email protected]>
> Hi,
>
> That is a known (but tricky) bug reported some times ago.
> David Baroso proposed something like :
>
> sum += ((*(u_int8_t *)addr & 0xFF)<<8);
>
> The difficulty is to find something working on both big and little
> endian systems.

Hello,
I tested that the code above in both sparc and x86 and it worked like a
charm. Perhaps it could be the best solution :-?