Coder Social home page Coder Social logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
I was able to achieve this just by hardcoding things, so this is would just be 
a handy feature to have.  I used:

    packet.setOption('classless_static_route',
        [0] + packet.getOption("router")
        + [16, 169, 254, 0, 0, 0, 0]
    )

Original comment by [email protected] on 12 Sep 2014 at 8:02

from staticdhcpd.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Thanks for reporting yet another thing!

Gmail flagged this as spam, so it went unnoticed (sorry!), but I'll reflect on 
this and get an implementation in place as soon as I've got time to go over the 
code.

-Neil

Original comment by red.hamsterx on 22 Sep 2014 at 6:00

from staticdhcpd.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Yeah, this definitely seems like it could be useful.

Allowing people to hack things is why it's classified as BYTE_PLUS (one or more 
bytes, unchecked), but I'll build an RFC handler for it and get that updated.

Original comment by red.hamsterx on 9 Oct 2014 at 1:17

  • Changed state: Accepted

from staticdhcpd.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
I'm afraid that, while the RFC seems to make sense and the encoding seems 
simple enough, I'm having trouble mapping it to the example you provided.

I get that 169.254.0.0/16 should go out over the default gateway, but the 
leading '0' seems redundant, and I'm not sure what 'router' value would satisfy 
the encoding. (Unless the leading '0' was actually a '32' or something)


It's a good opportunity to add CIDR evaluation to the IPv4 type either way, 
though, even if I don't integrate that into anything beyond this feature at 
this point. I should have time to tack it, hopefully, on Friday.

Original comment by red.hamsterx on 9 Oct 2014 at 1:32

from staticdhcpd.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
The leading 0 there indicates it's the default route.  Basically, that 
translates to '0.0.0.0/0', which would match any IP address.

Since routing is usually done by the most exact match (I think there's a better 
description here, but I can't recall it right now), it has the effect of 
sending all the 169.254.0.0/16 packets out the network interface, but routing 
everything else to the default router.

Original comment by [email protected] on 9 Oct 2014 at 1:35

from staticdhcpd.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Oh, yes, that makes sense: you have two route definitions there.

Thanks for clarifying it!

Original comment by red.hamsterx on 9 Oct 2014 at 2:40

from staticdhcpd.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
r786 has an rfc3442_121 type that handles this with clearer-looking syntax.

Like the other RFC types, though, setting bytes directly bypasses the 
validation mechanisms, so the code you've implemented should continue to work 
without modification.

Original comment by red.hamsterx on 21 Mar 2015 at 5:25

  • Changed state: Started

from staticdhcpd.

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.