mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 16:26:38 +00:00
[client] Set up firewall rules for dns routes dynamically based on dns response (#3702)
This commit is contained in:
@@ -4,13 +4,14 @@ import "strings"
|
||||
|
||||
const haSeparator = "|"
|
||||
|
||||
// HAUniqueID is a unique identifier that is used to group high availability routes.
|
||||
type HAUniqueID string
|
||||
|
||||
func (id HAUniqueID) String() string {
|
||||
return string(id)
|
||||
}
|
||||
|
||||
// NetID returns the Network ID from the HAUniqueID
|
||||
// NetID returns the NetID from the HAUniqueID
|
||||
func (id HAUniqueID) NetID() NetID {
|
||||
if i := strings.LastIndex(string(id), haSeparator); i != -1 {
|
||||
return NetID(id[:i])
|
||||
|
||||
Reference in New Issue
Block a user