fix(010): never enable UDP_GRO on android (GRO split-brain killed download)
runtime.GOOS=="android" (not "linux"), so StdNetBind enabled UDP_GRO and read rxOffload=true, but the GRO receive dispatcher in bind_std.go is gated on GOOS=="linux" → dead on android. A coalesced GRO super-packet was read as one datagram, corrupting the WG transport stream → download died on no-detour WG-endpoint (detour path uses ClientBind, no offload, so it worked). Gate both the UDP_GRO setsockopt (controlfns_linux.go) and the rxOffload readback (features_linux.go) behind !android. TX/GSO untouched, so non-android linux performance is unchanged. Confirmed on device (CPH2411/Android-15: probe gave rxOffload=true + dispatch=single). See SPECS/010-B-O-WG_ENDPOINT_GRO_SPLIT_BRAIN.
This commit is contained in:
parent
7b15aacbfe
commit
fb8d8d8fca
2 changed files with 19 additions and 0 deletions
|
|
@ -60,6 +60,15 @@ func init() {
|
|||
|
||||
// Attempt to enable UDP_GRO
|
||||
func(network, address string, c syscall.RawConn) error {
|
||||
// lx(010): skip UDP_GRO on android. The GRO receive path in bind_std.go
|
||||
// is gated on runtime.GOOS=="linux", which is false on android — so a
|
||||
// coalesced super-packet is never split and corrupts the WG stream
|
||||
// (download dies). Belt-and-suspenders with the rxOffload guard in
|
||||
// features_linux.go. TX/GSO untouched.
|
||||
// See SPECS/010-B-O-WG_ENDPOINT_GRO_SPLIT_BRAIN.
|
||||
if runtime.GOOS == "android" {
|
||||
return nil
|
||||
}
|
||||
c.Control(func(fd uintptr) {
|
||||
_ = unix.SetsockoptInt(int(fd), unix.IPPROTO_UDP, socketOptionUDPGRO, 1)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue