pydhcplib api breakage
authorAdam Glasgall <glasgall@mit.edu>
Sun, 28 Apr 2013 19:10:46 +0000 (15:10 -0400)
committerAdam Glasgall <glasgall@mit.edu>
Sun, 28 Apr 2013 19:10:46 +0000 (15:10 -0400)
debian/changelog
invirt-dhcpserver

index 3cb13d2..30d7788 100644 (file)
@@ -1,3 +1,10 @@
+invirt-dhcp (0.0.6~glasgall3) precise; urgency=low
+
+  * pydhcplib api breakage! server_identifier now has to be a "32-bits"
+    instead of an "ipv4"; adjust types accordingly.
+
+ -- Adam Glasgall <glasgall@mit.edu>  Sun, 28 Apr 2013 15:10:04 -0400
+
 invirt-dhcp (0.0.6~glasgall2) precise; urgency=low
 
   * pydhcpserver expects IP address strings to be strs. encode the
index c017447..1f57a8d 100755 (executable)
@@ -97,7 +97,7 @@ class DhcpBackend:
         nic = self.findNIC(str(chaddr))
         if nic is None or nic.machine is None:
             return False
-        ip = nic.ip
+        ip = nic.ip.encode("utf-8")
         if ip is None:  #Deactivated?
             return False
 
@@ -114,7 +114,7 @@ class DhcpBackend:
             del options['domain_name']
             options['domain_search'] = [config.dhcp.search_domain]
         if ip is not None:
-            ip = ipv4(ip.encode("utf-8"))
+            ip = ipv4(ip)
             s.syslog(s.LOG_DEBUG,"dhcp_backend : Discover result = "+str(ip))
             packet_parameters = self.getParameters(**options)
 
@@ -262,7 +262,7 @@ if '__main__' == __name__:
         print "invirt-dhcpserver: cannot determine local IP address by looking up %s" % socket.gethostname()
         sys.exit(1)
     
-    dhcp_options['server_identifier'] = myip
+    dhcp_options['server_identifier'] = ipv4(myip)
 
     backend = DhcpBackend()
     server = DhcpServer(backend, options)