style: Do not hard-code wireguard link-type identifier

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2025-01-02 03:14:17 +01:00
parent a29abcf95f
commit ca039964d1
2 changed files with 1 additions and 3 deletions

View File

@@ -61,7 +61,7 @@ func (i *Interface) setupUDPMux() error {
// TODO: Check why we cant use Daemon.InterfaceByName()
if lnk, err := link.FindLink(name); err != nil {
return false
} else if lnk.Type() == "wireguard" {
} else if lnk.Type() == link.TypeWireGuard {
return false
}

View File

@@ -10,9 +10,7 @@ import (
const (
EthernetMTU = 1500
)
const (
TypeWireGuard = "wireguard"
)