[U-Boot] [PATCH]Fix checksum to handle odd-length packet

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Dec 9 00:43:21 CET 2009


>
> Ah. I just realize that the endianess can be supported as simple as:
>
> In stead of this:
>                xsum += (*p & 0xff00);
> Use this:
>                xsum += (*p & ntohs(0xff00));

Did you look at the suggestion I sent you?
I know it works because I use in ospf.

 Jocke



More information about the U-Boot mailing list