mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-09-26 21:01:14 +08:00
style: Do not hard-code wireguard link-type identifier
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
@@ -10,9 +10,7 @@ import (
|
||||
|
||||
const (
|
||||
EthernetMTU = 1500
|
||||
)
|
||||
|
||||
const (
|
||||
TypeWireGuard = "wireguard"
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user