X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/python-pydhcplib.git/blobdiff_plain/739c89a9c6872a19d6c9ebd72ae1b6d82e4803e7..51fd48add1a94effa5378803a63d0c5ba9d34a8c:/debian/patches/non-standard-options.patch diff --git a/debian/patches/non-standard-options.patch b/debian/patches/non-standard-options.patch new file mode 100644 index 0000000..53f3605 --- /dev/null +++ b/debian/patches/non-standard-options.patch @@ -0,0 +1,16 @@ +Index: pydhcplib/dhcp_basic_packet.py +=================================================================== +--- sipb-xen-python-pydhcp/pydhcplib/dhcp_basic_packet.py ++++ sipb-xen-python-pydhcp/pydhcplib/dhcp_basic_packet.py +@@ -99,9 +99,9 @@ + "char":[1,0,1], "16-bits":[2,0,1], + "32-bits":[4,0,1], "identifier":[0,2,1]} + +- specs = fields_specs[DhcpOptionsTypes[DhcpOptions[name]]] ++ specs = fields_specs.get(DhcpOptionsTypes[DhcpOptions[name]], []) + length = len(value) +- if (specs[0]!=0 and specs==length) or (specs[1]<=length and length%specs[2]==0): ++ if specs == [] or (specs[0]!=0 and specs==length) or (specs[1]<=length and length%specs[2]==0): + self.options_data[name] = value + return True + else :