Skip to content

Commit

Permalink
🍞 service: fix tproxy UDP socket options
Browse files Browse the repository at this point in the history
Broken since 8589188.
  • Loading branch information
database64128 committed Mar 2, 2025
1 parent 8f5270f commit f3f06c7
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions service/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,15 @@ func (lnc *UDPListenerConfig) Configure(listenConfigCache conn.ListenConfigCache

return udpRelayServerConn{
listenConfig: listenConfigCache.Get(conn.ListenerSocketOptions{
SendBufferSize: conn.DefaultUDPSocketBufferSize,
ReceiveBufferSize: conn.DefaultUDPSocketBufferSize,
Fwmark: lnc.Fwmark,
TrafficClass: lnc.TrafficClass,
ReusePort: lnc.ReusePort,
Transparent: transparent,
PathMTUDiscovery: !lnc.AllowFragmentation,
ReceivePacketInfo: true,
SendBufferSize: conn.DefaultUDPSocketBufferSize,
ReceiveBufferSize: conn.DefaultUDPSocketBufferSize,
Fwmark: lnc.Fwmark,
TrafficClass: lnc.TrafficClass,
ReusePort: lnc.ReusePort,
Transparent: transparent,
PathMTUDiscovery: !lnc.AllowFragmentation,
ReceivePacketInfo: !transparent,
ReceiveOriginalDestAddr: transparent,
}),
network: lnc.Network,
address: lnc.Address,
Expand Down

0 comments on commit f3f06c7

Please sign in to comment.