CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2024/11/03 07:28:07
Modified files:
sys/netinet : udp_usrreq.c
Log message:
Clear UDP checksum out flag when stripping UDP header.
Some network interfaces, like lo(4) or vio(4), set the M_UDP_CSUM_OUT
flag on incoming packets. For optimization they produce packets
with M_UDP_CSUM_IN_OK, but the actual checksum field in the packet
is wrong. If such a packet is forwarded, the checksum must be
calculated. So they also set M_UDP_CSUM_OUT.
For protocols tunneled in UDP, udp_input() removes the header, but
the mbuf flags stay. This means later processing of the packet may
insert an UDP checksum, although it is not UDP anymore. This has
been observed when forwarding ping packets between two vxlan(4)
interfaces. Then an UDP checksum was inserted into the ICMP packet.
Clearing the M_UDP_CSUM_OUT flag when the UDP header is stripped,
fixes the problem.
OK mvs@