Page MenuHomeFreeBSD

rtwn: don't treat UDP/TCP checksum failure as permanent failure
ClosedPublic

Authored by adrian on Apr 2 2025, 12:00 AM.
Referenced Files
Unknown Object (File)
Mon, Jul 7, 8:33 AM
Unknown Object (File)
Sat, Jul 5, 10:00 PM
Unknown Object (File)
Sat, Jul 5, 9:18 PM
Unknown Object (File)
Wed, Jul 2, 2:34 AM
Unknown Object (File)
Mon, Jun 30, 12:47 PM
Unknown Object (File)
Sun, Jun 29, 9:36 AM
Unknown Object (File)
Sun, Jun 29, 9:32 AM
Unknown Object (File)
Wed, Jun 11, 5:06 AM
Subscribers

Details

Summary

jrtc27@freebsd.org reported that DHCP wasn't working on some
networks. She dug into it and found that the RTL8812AU/RTL8812AU
NICs seem to be failing UDP frames w/ a zero checksum, which is
a valid "there's no checksum" checksum.

So, just pass those frames up the stack and let the IP stack
deal with it. If the hardware claims the frames did pass TCP/UDP
checksum then still mark those frames with the checksum offload
bits.

PR: kern/285387

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz added inline comments.
sys/dev/rtwn/rtl8812a/r12a_rx.c
202

If this is just UDP you could filter those errors out if I read the above debug printf correctly. Slight optimization...?

sys/dev/rtwn/rtl8812a/r12a_rx.c
202

I thought about only returning 0 for UDP + CKSUM error, but -1 for TCP + CKSUM error.

@jrtc27 wanna try changing the logic locally and make sure you don't see any weird corner cases?

This revision was not accepted when it landed; it landed in state Needs Review.Apr 23 2025, 2:04 AM
This revision was automatically updated to reflect the committed changes.