mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-09-27 05:06:02 +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()
|
// TODO: Check why we cant use Daemon.InterfaceByName()
|
||||||
if lnk, err := link.FindLink(name); err != nil {
|
if lnk, err := link.FindLink(name); err != nil {
|
||||||
return false
|
return false
|
||||||
} else if lnk.Type() == "wireguard" {
|
} else if lnk.Type() == link.TypeWireGuard {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,9 +10,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
EthernetMTU = 1500
|
EthernetMTU = 1500
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
TypeWireGuard = "wireguard"
|
TypeWireGuard = "wireguard"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user