Module Name:    src
Committed By:   msaitoh
Date:           Mon Nov 11 08:12:35 UTC 2019

Modified Files:
        src/sys/net: if_loop.c

Log Message:
 Fix IP broadcast + checksum offload problem.

 When a machine sends a IP broadcast packet to an Ethernet interface that the
checksum offload flags are set, the packet goes through ether_output() ->
looutput() and the offload flags is cleard without calculating the checksum.
And then, ip_input() calculate the packet's checksum because it's csum_flags is
zero. It regard as bad checksum and it's dropped because the packet's ifp
is s not lo0's. Fixes this bug by passing csum_flags as "calculated and good"
when IN_LOOPBACK_NEED_CHECKSUM() is false. Adviced by ryo@.

 This problem was seen when "routed -s" was used and the machine's interface's
offload flags were set. bad checksum field of "netstat -s" was increased every
30 minutes.

To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/net/if_loop.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to