fix(wireguard): fix detection of kernelspace wireguard

This commit is contained in:
Quentin McGaw
2026-01-20 15:40:59 +00:00
parent a10349e378
commit 857fe425ec
10 changed files with 31 additions and 62 deletions
+11 -1
View File
@@ -1,8 +1,18 @@
package netlink
import "net/netip"
import (
"net/netip"
"github.com/qdm12/log"
)
func makeNetipPrefix(n byte) netip.Prefix {
const bits = 24
return netip.PrefixFrom(netip.AddrFrom4([4]byte{n, n, n, 0}), bits)
}
type noopLogger struct{}
func (l *noopLogger) Debug(_ string) {}
func (l *noopLogger) Debugf(_ string, _ ...any) {}
func (l *noopLogger) Patch(_ ...log.Option) {}