summaryrefslogtreecommitdiffhomepage
path: root/conn/controlfns_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'conn/controlfns_linux.go')
-rw-r--r--conn/controlfns_linux.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/conn/controlfns_linux.go b/conn/controlfns_linux.go
index a2396fe..f6ab1d2 100644
--- a/conn/controlfns_linux.go
+++ b/conn/controlfns_linux.go
@@ -57,5 +57,13 @@ func init() {
}
return err
},
+
+ // Attempt to enable UDP_GRO
+ func(network, address string, c syscall.RawConn) error {
+ c.Control(func(fd uintptr) {
+ _ = unix.SetsockoptInt(int(fd), unix.IPPROTO_UDP, unix.UDP_GRO, 1)
+ })
+ return nil
+ },
)
}