Faulty method isNetworkAWithinNetworkB ?

2013-12-13 Thread Saksham Srivastava
Hi, I encountered a method isNetworkAWithinNetworkB(cidrA, cidrB) in NetUtils.java which should return true if cidrA is a subset of cidrB. The method returns flawed output in many scenarios. After unittesting it I found : isNetworkAWithinNetworkB("10.1.1.0/24", "10.1.1.0/25") returns true isNet

Re: Faulty method isNetworkAWithinNetworkB ?

2013-12-23 Thread Jayapal Reddy Uradi
Hi Saksham, Always the higher suffix cidr will be in lower suffix cidr. 10.1.1.0/24 will have 256 addresses and 10.1.1.0/25 will have 128 addresses[1]. /25 will be completely in /24 but not wise versa. The below are incorrect. > isNetworkAWithinNetworkB("10.1.1.0/24", "10.1.1.0/25") returns tru

RE: Faulty method isNetworkAWithinNetworkB ?

2013-12-24 Thread Saksham Srivastava
, December 23, 2013 6:03 PM To: Subject: Re: Faulty method isNetworkAWithinNetworkB ? Hi Saksham, Always the higher suffix cidr will be in lower suffix cidr. 10.1.1.0/24 will have 256 addresses and 10.1.1.0/25 will have 128 addresses[1]. /25 will be completely in /24 but not wise versa. The