Comments (5)
Part two of this:
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/usr/lib64/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "/root/staticdhcpd-read-only-2/staticDHCPd/staticdhcpdlib/dhcp.py", line 391, in wrappedHandler
f(self, wrapper)
File "/root/staticdhcpd-read-only-2/staticDHCPd/staticdhcpdlib/dhcp.py", line 498, in _handleDHCPDiscover
if wrapper.loadDHCPPacket(definition):
File "/root/staticdhcpd-read-only-2/staticDHCPd/staticdhcpdlib/dhcp.py", line 346, in loadDHCPPacket
self._original_packet
File "/root/staticdhcpd-read-only-2/staticDHCPd/conf/conf.py", line 224, in loadDHCPPacket
print source_packet
File "/root/staticdhcpd-read-only-2/staticDHCPd/libpydhcpserver/dhcp_types/packet.py", line 1030, in __str__
result = _FORMAT_CONVERSION_DESERIAL[DHCP_OPTIONS_TYPES[option_id]](data)
KeyError: 'RFC3004_77'
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/usr/lib64/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "/root/staticdhcpd-read-only-2/staticDHCPd/staticdhcpdlib/dhcp.py", line 391, in wrappedHandler
f(self, wrapper)
File "/root/staticdhcpd-read-only-2/staticDHCPd/staticdhcpdlib/dhcp.py", line 498, in _handleDHCPDiscover
if wrapper.loadDHCPPacket(definition):
File "/root/staticdhcpd-read-only-2/staticDHCPd/staticdhcpdlib/dhcp.py", line 346, in loadDHCPPacket
self._original_packet
File "/root/staticdhcpd-read-only-2/staticDHCPd/conf/conf.py", line 224, in loadDHCPPacket
print source_packet
File "/root/staticdhcpd-read-only-2/staticDHCPd/libpydhcpserver/dhcp_types/packet.py", line 1030, in __str__
result = _FORMAT_CONVERSION_DESERIAL[DHCP_OPTIONS_TYPES[option_id]](data)
KeyError: 'Unassigned'
I fixed all of these with the following patch:
Index: libpydhcpserver/dhcp_types/constants.py
===================================================================
--- libpydhcpserver/dhcp_types/constants.py (revision 776)
+++ libpydhcpserver/dhcp_types/constants.py (working copy)
@@ -218,7 +218,7 @@
74: TYPE_IPV4_PLUS,
75: TYPE_IPV4_PLUS,
76: TYPE_IPV4_PLUS,
- 77: "RFC3004_77", #Not implemented; not necessary for static model
+ 77: TYPE_NONE, #Not implemented; not necessary for static model
78: "RFC2610_78", #Implemented
79: "RFC2610_79", #Implemented
80: TYPE_NONE,
@@ -284,7 +284,7 @@
163: "Unassigned", 164: "Unassigned", 165: "Unassigned", 166: "Unassigned",
167: "Unassigned", 168: "Unassigned", 169: "Unassigned", 170: "Unassigned",
171: "Unassigned", 172: "Unassigned", 173: "Unassigned", 174: "Unassigned",
- 175: "Unassigned", #Etherboot
+ 175: TYPE_NONE, #Etherboot
176: "Unassigned", #IP Telephone
177: "Unassigned", #Etherboot
178: "Unassigned", 179: "Unassigned", 180: "Unassigned", 181: "Unassigned",
@@ -459,6 +459,7 @@
'capwap_ac_v4': 138,
'ipv4_mos': 139,
'fqdn_mos': 140,
+ 'ipxe_test': 175,
#hole
'pxelinux_magic': 208,
'configuration_file': 209,
Original comment by [email protected]
on 3 Oct 2014 at 7:15
from staticdhcpd.
In r782, this is handled by making the string-serialiser less-naive when
iterating over options. Providing a null implementation for something that is
unsupported seems like a bad idea (because it doesn't explicitly mark it as
untouched for anyone looking to extend functionality), but the net effect would
be about the same.
Since you've got an iPXE setup, any practical data you can share could help
with building a useful implementation for the protocol. (I'll be leaving this
issue unclosed in case you want to follow up on it)
As always, thanks for the feedback!
Original comment by red.hamsterx
on 9 Oct 2014 at 1:11
from staticdhcpd.
Original comment by red.hamsterx
on 9 Oct 2014 at 1:11
- Changed state: Started
from staticdhcpd.
iPXE uses this field to indicate some additional data about it's configuration
(such as what protocols are supported). This is documented at
http://ipxe.org/howto/dhcpd#ipxe-specific_options
This does have some handy uses (for example, you can burn a trimmed down
version of iPXE to your NIC's flash, and then load a fully featured version
over the network).
However, it's a fairly uncommon feature (most people use the NIC's built in
firmware to load iPXE, so feature checks are unnecessary)
Original comment by [email protected]
on 9 Oct 2014 at 1:32
from staticdhcpd.
Somehow skipped over this one following your last reply. Sorry. :(
Merged in r785. I went with TYPE_STRING instead of TYPE_NONE, since that allows
for the possibility of the operator entering their own data and parsing
requests. If you can provide a raw packet capture at some point in the future,
I'll reimplement it as a proper data-structure.
Original comment by red.hamsterx
on 21 Mar 2015 at 4:12
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.