Comments (7)
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.
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.
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.
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.
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.
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.
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)
- PXE? HOT 6
- Support for relay agents requiring Option 82 HOT 2
- Publishing project to PIP? HOT 3
- support for Database INSERT for unknownMAC HOT 3
- IPv6 support? HOT 2
- How can I handleUnknownMAC? I want my server should allocate IP to the client even if mac address of client is not in INI or database. HOT 5
- Doesn't support python 3 (and doesn't document that) HOT 1
- Can staticdhcpd make a lease table from watching DHCP traffic? HOT 2
- adding extentions HOT 2
- AttributeError: 'NoneType' object has no attribute 'split' HOT 7
- TypeError: setsockopt() argument 3 must be string or read-only buffer, not None HOT 20
- staticDHCPd version 2.0.0-rc1 doesn't start HOT 3
- Cannot load mysql.sql on MariaDB 10.3.17 HOT 3
- Error in the rfc3925_125_decode function HOT 1
- dev null dup2 Bad file descriptor HOT 1
- Need to Port to Python3 HOT 22
- Documentation HOT 2
- DHCPRENEW support HOT 1
- Oracle database support is untested
- Errors in ver 3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from staticdhcpd.