You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using prefix returns wrong ip range. Normarlly I give to prefix function network like 8.8.8.8/24 ,I expect to see 8.8.8.0-8.8.8.255 ip pool but function returns 8.8.8.8-8.8.9.7
To Reproduce
Steps to reproduce the behavior:
let prefix=new Ip.Prefix("8.8.8.8",24)
prefix.lastIp().toString() ;//"8.8.9.7"
Expected behavior
let prefix=new Ip.Prefix("8.8.8.8",24)
prefix.lastIp().toString() ;//"8.8.8.255"
The text was updated successfully, but these errors were encountered:
For performance reasons the Prefix constructor doesn't automatically check for bit boundary correctness, that's why you get those results on 8.8.8.8/24, which is invalid CIDR technically.
But, you can always force the correction after creation by running:
const prefix = (new Ip.Prefix("8.8.8.8",24)).correctBitBoundary();
prefix.lastIp().toString(); // "8.8.8.255"
Describe the bug
Using prefix returns wrong ip range. Normarlly I give to prefix function network like 8.8.8.8/24 ,I expect to see 8.8.8.0-8.8.8.255 ip pool but function returns 8.8.8.8-8.8.9.7
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The text was updated successfully, but these errors were encountered: