Code Monkey home page Code Monkey logo

Comments (2)

minexew avatar minexew commented on August 25, 2024

The specific check that rejects DNS-less DHCP offers is at

if (have_type && have_dns && have_subnet && have_router) {

It seems that Dns.HC is prepared for the possibility of not having a valid DNS server. (

if (!dns_ip)
) The -1 return value should be replaced with a proper error code if it is actually propagated.

I am unsure if/how it should be communicated by DhcpParseOffer that the DHCP request was satisfied, but no DNS was provided.

If you can implement and test the necessary changes, I would gladly merge them.

from shrine.

 avatar commented on August 25, 2024

Sure. I also found that the VirtualBox DHCP server on host networks doesn't send a ROUTER type message (probably because a gateway is not needed considering host networks are local only).

From what I understand a null gateway address will simply cause an invalid address error on addresses outside of the subnet [https://github.com/minexew/Shrine/blob/master/SnailNet/IPv4.HC#L91, https://github.com/minexew/Shrine/blob/master/SnailNet/IPv4.HC#L79], which should work as an error.

As such, the changes to do seem to just be removing the have_dns and have_router checks.

EDIT: Actually, it should probably return IPV4_EHOST_UNREACHABLE. The changes are still trivial, though.

from shrine.

Related Issues (20)

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.