Commit 73022809 authored by David S. Miller's avatar David S. Miller

[IPX]: Fix checksum computation.

parent 32a90335
...@@ -937,9 +937,13 @@ static unsigned long atalk_sum_partial(const unsigned char *data, ...@@ -937,9 +937,13 @@ static unsigned long atalk_sum_partial(const unsigned char *data,
{ {
/* This ought to be unwrapped neatly. I'll trust gcc for now */ /* This ought to be unwrapped neatly. I'll trust gcc for now */
while (len--) { while (len--) {
sum += *data++; sum += *data;
sum <<= 1; sum <<= 1;
sum = ((sum >> 16) + sum) & 0xFFFF; if (sum & 0x10000) {
sum++;
sum &= 0xffff;
}
data++;
} }
return sum; return sum;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment