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

Reassigned Blocks Returns Null Response #4

Open
felsokning opened this issue Dec 18, 2019 · 0 comments
Open

Reassigned Blocks Returns Null Response #4

felsokning opened this issue Dec 18, 2019 · 0 comments

Comments

@felsokning
Copy link

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.

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