Skip to content
Commit d903bca9 authored by James Hogan's avatar James Hogan
Browse files

metag: checksum.h: fix carry in csum_tcpudp_nofold



In csum_tcpudp_nofold, add 1 if the carry bit is set after adding the
destination IP address (32 bits) to the checksum (16 bits).

The lack of carry handling for this particular addition meant that a
destination address of *.*.255.255 (e.g. certain broadcasts) sometimes
resulted in an incorrect checksum. This bug has been present in the Meta
port since the code was written in the 2.4 days.

Reported-by: default avatarMarcin Nowakowski <Marcin.Nowakowski@pure.com>
Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
parent 8bb495e3
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