Skip to content
New issue

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

Subnet in subnet #52

Open
gczuczy opened this issue Dec 22, 2015 · 0 comments
Open

Subnet in subnet #52

gczuczy opened this issue Dec 22, 2015 · 0 comments

Comments

@gczuczy
Copy link

gczuczy commented Dec 22, 2015

Hello,

Using python2.6 (centos6) I've found the following:

$ python
Python 2.6.6 (r266:84292, Nov 21 2013, 10:50:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipcalc
>>> subnet = ipcalc.Network('128.121.0.0/16')
>>> rentry = ipcalc.Network('128.121.159.48/28')
>>> subnet in rentry
True
>>> rentry in subnet
True

And it's ipcalc version 1.1.3

Are you exactly sure that the above expression should return true in both direction? Personally I think a /16 should have difficulties in being a subset of a /28. It's very hard to create a /28 superset which covers a /16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant