-
Notifications
You must be signed in to change notification settings - Fork 17
Description
I've found a bug with reassigned blocks that causes the return object to be null.
string foundIpAddress = "40.107.14.45";
ArinClient arinClient = new ArinClient();
Response ipResponse = arinClient.QueryIpAsync(IPAddress.Parse(foundIpAddress)).Result;
The ipResponse object will be null when it is accessed and I believe that this is because the return from ARIN is not in the serialised type that the ARIN Client is expecting. In other words, it obtains data but not in the JSON form that it's expecting.
Below is the content from ARIN, so it's generating a response:
{"net":{"@xmlns":{"ns3":"http:\/\/www.arin.net\/whoisrws\/netref\/v2","ns2":"http:\/\/www.arin.net\/whoisrws\/rdns\/v1","$":"http:\/\/www.arin.net\/whoisrws\/core\/v1"},"@copyrightNotice":"Copyright 1997-2019, American Registry for Internet Numbers, Ltd.","@inaccuracyReportUrl":"https:\/\/www.arin.net\/resources\/registry\/whois\/inaccuracy_reporting\/","@termsOfUse":"https:\/\/www.arin.net\/resources\/registry\/whois\/tou\/","registrationDate":{"$":"2015-02-23T14:30:24-05:00"},"rdapRef":{"$":"https:\/\/rdap.arin.net\/registry\/ip\/40.74.0.0"},"ref":{"$":"https:\/\/whois.arin.net\/rest\/net\/NET-40-74-0-0-1"},"endAddress":{"$":"40.125.127.255"},"handle":{"$":"NET-40-74-0-0-1"},"name":{"$":"MSFT"},"netBlocks":{"netBlock":[{"cidrLength":{"$":"15"},"endAddress":{"$":"40.75.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.74.0.0"}},{"cidrLength":{"$":"17"},"endAddress":{"$":"40.125.127.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.125.0.0"}},{"cidrLength":{"$":"14"},"endAddress":{"$":"40.79.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.76.0.0"}},{"cidrLength":{"$":"13"},"endAddress":{"$":"40.119.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.112.0.0"}},{"cidrLength":{"$":"16"},"endAddress":{"$":"40.124.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.124.0.0"}},{"cidrLength":{"$":"14"},"endAddress":{"$":"40.123.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.120.0.0"}},{"cidrLength":{"$":"12"},"endAddress":{"$":"40.111.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.96.0.0"}},{"cidrLength":{"$":"12"},"endAddress":{"$":"40.95.255.255"},"description":{"$":"Direct Assignment"},"type":{"$":"DS"},"startAddress":{"$":"40.80.0.0"}}]},"resources":{"@copyrightNotice":"Copyright 1997-2019, American Registry for Internet Numbers, Ltd.","@inaccuracyReportUrl":"https:\/\/www.arin.net\/resources\/registry\/whois\/inaccuracy_reporting\/","@termsOfUse":"https:\/\/www.arin.net\/resources\/registry\/whois\/tou\/","limitExceeded":{"@limit":"256","$":"false"}},"orgRef":{"@handle":"MSFT","@name":"Microsoft Corporation","$":"https:\/\/whois.arin.net\/rest\/org\/MSFT"},"parentNetRef":{"@handle":"NET-40-0-0-0-0","@name":"NET40","$":"https:\/\/whois.arin.net\/rest\/net\/NET-40-0-0-0-0"},"startAddress":{"$":"40.74.0.0"},"updateDate":{"$":"2015-05-27T13:38:53-04:00"},"version":{"$":"4"}}}
So far, this seems specific to all reassigned blocks.