From b03dc9b590e1f4c07a5b3e9c4365568b6ee4b3be Mon Sep 17 00:00:00 2001 From: Vadym Vikulin Date: Tue, 19 Dec 2023 13:10:12 +0200 Subject: [PATCH] Unit test fixes RIVM-123 --- src/tun/tun_bsd.go | 2 +- src/tun/tun_darwin.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tun/tun_bsd.go b/src/tun/tun_bsd.go index d433f1373..c6dacd10a 100644 --- a/src/tun/tun_bsd.go +++ b/src/tun/tun_bsd.go @@ -140,7 +140,7 @@ func (tun *TunAdapter) setupAddress(addr string) error { copy(ar.ifr_name[:], tun.Name()) ar.ifru_addr.sin6_len = uint8(unsafe.Sizeof(ar.ifru_addr)) ar.ifru_addr.sin6_family = unix.AF_INET6 - a, _, err := net.ParseCIDR(address) + a, _, err := net.ParseCIDR(addr) if err != nil { tun.log.Printf("Incorrect CIDR: %v.", err) return err diff --git a/src/tun/tun_darwin.go b/src/tun/tun_darwin.go index fcff22d1a..31b2e0664 100644 --- a/src/tun/tun_darwin.go +++ b/src/tun/tun_darwin.go @@ -127,7 +127,7 @@ func (tun *TunAdapter) setupAddress(addr string) error { ar.ifra_addr.sin6_len = uint8(unsafe.Sizeof(ar.ifra_addr)) ar.ifra_addr.sin6_family = unix.AF_INET6 - a, _, err := net.ParseCIDR(address) + a, _, err := net.ParseCIDR(addr) if err != nil { tun.log.Printf("Incorrect CIDR: %v.", err) return err