Package: python-pydhcplib
Version: 0.6.2-2
Severity: normal
Tags: upstream patch

Hi,

There is an error message when calling "CreateDhcpAckPacketFrom(packet)" :

pydhcplib.dhcp_basic_packet.setoption error : unknown option 
ip_address_lease_time_option

The error is not critical as it doesn't generate an exception that would stop 
script execution, but it makes annoying output.

The correct option to use is "ip_address_lease_time". I found also the same 
problem in "TransformToDhcpNackPacket(self)".

I attached a patch correcting this issue.

Best regards,

Nicolas Pichon.


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-pydhcplib depends on:
ii  python          2.7.2-10
ii  python-support  1.0.14

python-pydhcplib recommends no packages.

python-pydhcplib suggests no packages.

-- no debconf information
--- /usr/share/pyshared/pydhcplib/dhcp_packet.py.old	2010-04-29 20:16:13.000000000 +0000
+++ /usr/share/pyshared/pydhcplib/dhcp_packet.py.new	2012-04-24 10:25:09.037568685 +0000
@@ -303,7 +303,7 @@
         self.SetOption("flags",src.GetOption("flags"))
         self.SetOption("giaddr",src.GetOption("giaddr"))
         self.SetOption("chaddr",src.GetOption("chaddr"))
-        self.SetOption("ip_address_lease_time_option",src.GetOption("ip_address_lease_time_option"))
+        self.SetOption("ip_address_lease_time",src.GetOption("ip_address_lease_time"))
         self.TransformToDhcpAckPacket()
 
     def TransformToDhcpAckPacket(self): # src = request or inform packet
@@ -338,7 +338,7 @@
         self.DeleteOption("sname")
         self.DeleteOption("file")
         self.DeleteOption("request_ip_address")
-        self.DeleteOption("ip_address_lease_time_option")
+        self.DeleteOption("ip_address_lease_time")
         self.DeleteOption("parameter_request_list")
         self.DeleteOption("client_identifier")
         self.DeleteOption("maximum_message_size")

Reply via email to