Merge "Fix AddrFormatError in DHCPv6 lease release code"

This commit is contained in:
Jenkins
2016-09-02 00:07:10 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -771,6 +771,7 @@ class Dnsmasq(DhcpLocalProcess):
continue
parts = l.strip().split()
(iaid, ip, client_id) = parts[1], parts[2], parts[4]
ip = ip.strip('[]')
if netaddr.IPAddress(ip).version == constants.IP_VERSION_4:
continue
leases[ip] = {'iaid': iaid,

View File

@@ -1856,11 +1856,11 @@ class TestDnsmasq(TestBase):
"1472673289 aa:bb:cc:00:00:01 192.168.1.3 host-192-168-1-3 *",
"1472673289 aa:bb:cc:00:00:01 192.168.1.4 host-192-168-1-4 *",
"duid 00:01:00:01:02:03:04:05:06:07:08:09:0a:0b",
"1472597740 1044800001 2001:DB8::a host-2001-db8--a "
"1472597740 1044800001 [2001:DB8::a] host-2001-db8--a "
"00:04:4a:d0:d2:34:19:2b:49:08:84:e8:34:bd:0c:dc:b9:3b",
"1472597823 1044800002 2001:DB8::b host-2001-db8--b "
"1472597823 1044800002 [2001:DB8::b] host-2001-db8--b "
"00:04:ce:96:53:3d:f2:c2:4c:4c:81:7d:db:c9:8d:d2:74:22:3b:0a",
"1472599048 1044800003 2001:DB8::c host-2001-db8--c "
"1472599048 1044800003 [2001:DB8::c] host-2001-db8--c "
"00:04:4f:f0:cd:ca:5e:77:41:bc:9d:7f:5c:33:31:37:5d:80:77:b4"
]
mock_open = self.useFixture(