[client] Fix bind exclusion routes (#4154)

This commit is contained in:
Viktor Liu
2025-07-21 12:13:21 +02:00
committed by GitHub
parent 40fdeda838
commit d6ed9c037e
25 changed files with 230 additions and 151 deletions

View File

@@ -0,0 +1,15 @@
package bind
import (
wireguard "golang.zx2c4.com/wireguard/conn"
nbnet "github.com/netbirdio/netbird/util/net"
)
// TODO: This is most likely obsolete since the control fns should be called by the wrapped udpconn (ice_bind.go)
func init() {
listener := nbnet.NewListener()
if listener.ListenConfig.Control != nil {
*wireguard.ControlFns = append(*wireguard.ControlFns, listener.ListenConfig.Control)
}
}