Skip to content

Commit b92b7ed

Browse files
committed
Use the correct bit length for the provided address
Signed-off-by: MrMelon54 <[email protected]>
1 parent 8569131 commit b92b7ed

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)