Allow candidates on local routes if more specific than vpn routes (#2097)

This commit is contained in:
Viktor Liu
2024-06-17 09:47:17 +02:00
committed by GitHub
parent 245b086646
commit c9f3854dde
12 changed files with 227 additions and 37 deletions

View File

@@ -1,9 +1,11 @@
package net
import (
"github.com/netbirdio/netbird/iface/netstack"
"net"
"os"
"github.com/netbirdio/netbird/iface/netstack"
"github.com/google/uuid"
)
@@ -18,6 +20,9 @@ const (
// It's used to track connections throughout their lifecycle so the close hook can correlate with the dial hook.
type ConnectionID string
type AddHookFunc func(connID ConnectionID, IP net.IP) error
type RemoveHookFunc func(connID ConnectionID) error
// GenerateConnID generates a unique identifier for each connection.
func GenerateConnID() ConnectionID {
return ConnectionID(uuid.NewString())