Allow disabling custom routing (#1840)

This commit is contained in:
Viktor Liu
2024-04-12 16:53:11 +02:00
committed by GitHub
parent 15a2feb723
commit d30cf8706a
9 changed files with 64 additions and 16 deletions

View File

@@ -230,7 +230,7 @@ func (p *WGEBPFProxy) prepareSenderRawSocket() (net.PacketConn, error) {
}
// Set the fwmark on the socket.
err = syscall.SetsockoptInt(fd, syscall.SOL_SOCKET, syscall.SO_MARK, nbnet.NetbirdFwmark)
err = nbnet.SetSocketOpt(fd)
if err != nil {
return nil, fmt.Errorf("setting fwmark failed: %w", err)
}