Do not use SO_MARK in case of netstack mode. (#2104)

This commit is contained in:
Zoltan Papp 2024-06-07 15:07:23 +02:00 committed by GitHub
parent deffe037aa
commit 10d8617be6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
package net package net
import ( import (
"github.com/netbirdio/netbird/iface/netstack"
"os" "os"
"github.com/google/uuid" "github.com/google/uuid"
@ -23,5 +24,8 @@ func GenerateConnID() ConnectionID {
} }
func CustomRoutingDisabled() bool { func CustomRoutingDisabled() bool {
if netstack.IsEnabled() {
return true
}
return os.Getenv(envDisableCustomRouting) == "true" return os.Getenv(envDisableCustomRouting) == "true"
} }