MCPcopy Create free account
hub / github.com/encodeous/nylon / errShouldDisableUDPGSO

Function errShouldDisableUDPGSO

polyamide/conn/errors_linux.go:15–26  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

13)
14
15func errShouldDisableUDPGSO(err error) bool {
16 var serr *os.SyscallError
17 if errors.As(err, &serr) {
18 // EIO is returned by udp_send_skb() if the device driver does not have
19 // tx checksumming enabled, which is a hard requirement of UDP_SEGMENT.
20 // See:
21 // https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man7/udp.7?id=806eabd74910447f21005160e90957bde4db0183#n228
22 // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv4/udp.c?h=v6.2&id=c9c3395d5e3dcc6daee66c6908354d47bf98cb0c#n942
23 return serr.Err == unix.EIO
24 }
25 return false
26}

Callers 1

SendMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected