diff options
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1574,10 +1574,11 @@ unsigned NetCksum(uchar * ptr, int len) { ulong xsum; + ushort *p = ptr; xsum = 0; while (len-- > 0) - xsum += *((ushort *)ptr)++; + xsum += *p++; xsum = (xsum & 0xffff) + (xsum >> 16); xsum = (xsum & 0xffff) + (xsum >> 16); return (xsum & 0xffff); |