We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
use ipnetwork::Ipv4Network; let net: Ipv4Network = "10.1.0.0/16".parse().unwrap(); let net2: Ipv4Network = "10.1.0.0/15".parse().unwrap(); println!("{:?} {} {}", net2, net.is_supernet_of(net2), net.is_supernet_of(Ipv4Network::new(net2.network(), net2.prefix()).unwrap()));
Output: Ipv4Network { addr: 10.1.0.0, prefix: 15 } true false
Ipv4Network { addr: 10.1.0.0, prefix: 15 } true false
So, is_supernet_of accidentally thinks that /16 is a supernet of /15 if network address is the same.
PS: Prefix "X/Y" consists of network address X and bits Y. So, function prefix which return bits confuses any network engineer.
The text was updated successfully, but these errors were encountered:
Confirmed.
Sorry, something went wrong.
No branches or pull requests
Hi
Output:
Ipv4Network { addr: 10.1.0.0, prefix: 15 } true false
So, is_supernet_of accidentally thinks that /16 is a supernet of /15 if network address is the same.
PS: Prefix "X/Y" consists of network address X and bits Y. So, function prefix which return bits confuses any network engineer.
The text was updated successfully, but these errors were encountered: