Skip to content

Commit ccbcd9b

Browse files
committed
Use the correct bit length for the provided address
1 parent fe89dca commit ccbcd9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/wglinux/configure_linux_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ func generateIPs(n int) []netip.Prefix {
532532
panicf("failed to convert net.IP to netip.Addr: %s", pos.IP)
533533
}
534534

535-
ips = append(ips, netip.PrefixFrom(addr, 128))
535+
ips = append(ips, netip.PrefixFrom(addr, addr.BitLen()))
536536
}
537537

538538
return ips

0 commit comments

Comments
 (0)