Coder Social home page Coder Social logo

vast's People

Contributors

mattboyer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

vast's Issues

Correctly handle redirections and whois failover during CIDR block resolution

vast tries to map a given IP address to a an assigned subnet using RDAP and, if that fails, defaults to plain old nicname/whois on TCP port 43.

For 24.152.0.0, the initial RDAP lookup results in a redirect to a different RDAP server (ARIN -> LACNIC in this case), with the redirected query yielding an invalid JSON object. The resulting whois lookup is no better:

      INFO| vast.metadata.RDAP             -- RDAP query https://rdap.arin.net/registry/ip/24.152.0.0: 303
      INFO| vast.metadata.RDAP             -- RDAP query https://rdap.lacnic.net/rdap/ip/24.152.0.0: 404
      INFO| vast.metadata.resolver         -- Caught "RDAP resource not found: https://rdap.lacnic.net/rdap/ip/24.152.0.0". Trying whois
     DEBUG| vast.metadata.whois            -- Resolved "whois.arin.net" to ('199.212.0.46', 43)
      INFO| vast.metadata.whois            -- WHOIS query whois.arin.net
     ERROR| vast.metadata.resolver         -- Malformed Whois entry: ARIN's WHOIS service provides a mechanism for finding contact and registration
   WARNING| vast.tools.mapper              -- Couldn't resolve 24.152.0.0

In this case, we should pick the lookup that yielded the most information, that is to say at least a
prefix length, which in this case is the initial RDAP lookup against ARIN's server.

More broadly, we want to ensure that we avoid all cases where a sequence of more than one lookup results in a ResolutionException that could be avoided by keeping track of provisional assigned subnets throughout the redirect/failover process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.