projects
/
invirt/packages/invirt-dhcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bugfixes to make it run
[invirt/packages/invirt-dhcp.git]
/
dhcpserver.py
diff --git
a/dhcpserver.py
b/dhcpserver.py
index
5c7721c
..
af21b16
100644
(file)
--- a/
dhcpserver.py
+++ b/
dhcpserver.py
@@
-1,9
+1,15
@@
#!/usr/bin/python
#!/usr/bin/python
+import sys.path
+sys.path.append('pydhcplib/')
import pydhcplib
import pydhcplib
+import pydhcplib.dhcp_network
from pydhcplib.dhcp_packet import *
from pydhcplib.type_hw_addr import hwmac
from pydhcplib.type_ipv4 import ipv4
from pydhcplib.dhcp_packet import *
from pydhcplib.type_hw_addr import hwmac
from pydhcplib.type_ipv4 import ipv4
+import event_logger
+if '__main__' == __name__:
+ event_logger.init("stdout", 'INFO', {})
from event_logger import Log
import sipb_xen_database
from event_logger import Log
import sipb_xen_database
@@
-70,7
+76,7
@@
class DhcpServer(pydhcplib.dhcp_network.DhcpServer):
Log.Output(Log.debug, "__init__ DhcpServer")
def SendPacket(self, packet):
Log.Output(Log.debug, "__init__ DhcpServer")
def SendPacket(self, packet):
- """Encode and send the packet."""
+ """Encode and send the packet."""
giaddr = packet.GetOption('giaddr')
giaddr = packet.GetOption('giaddr')
@@
-149,7
+155,6
@@
class DhcpServer(pydhcplib.dhcp_network.DhcpServer):
# FIXME : what if false ?
if '__main__' == __name__:
# FIXME : what if false ?
if '__main__' == __name__:
- event_logger.init("stdout", event_logger.INFO, {})
options = { "server_listen_port":67,
"client_listen_port":68,
"listen_address":"0.0.0.0"}
options = { "server_listen_port":67,
"client_listen_port":68,
"listen_address":"0.0.0.0"}