From 38736358dda588e30cbce931f7f41fdf26f5d5f0 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 26 Feb 2023 21:35:56 +0000 Subject: [PATCH] Fix lint error properly this time --- src/tun/tun.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tun/tun.go b/src/tun/tun.go index 9ec7bc9..fcd597b 100644 --- a/src/tun/tun.go +++ b/src/tun/tun.go @@ -108,7 +108,7 @@ func (tun *TunAdapter) _start() error { tun.addr = tun.rwc.Address() tun.subnet = tun.rwc.Subnet() prefix := address.GetPrefix() - addr := fmt.Sprintf("%s/%d", net.IP(tun.addr[:]).String(), 8*len(prefix)-1) + addr := fmt.Sprintf("%s/%d", net.IP(tun.addr[:]).String(), 8*len(prefix[:])-1) if tun.config.name == "none" || tun.config.name == "dummy" { tun.log.Debugln("Not starting TUN as ifname is none or dummy") tun.isEnabled = false