Parcourir la source

[2702] Fix for DHCPv4 client renewals (without client-id)

Tomek Mrugalski il y a 12 ans
Parent
commit
daf2abe68c
2 fichiers modifiés avec 6 ajouts et 1 suppressions
  1. 5 0
      ChangeLog
  2. 1 1
      src/lib/dhcpsrv/alloc_engine.cc

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+5XX.	[func]		marcin,tomek
+	b10-dhcp4: Address renewal now works properly for DHCPv4 clients
+	that do not send client-ids.
+	(Trac #2702, git TBD)
+
 568.	[func]          muks
 568.	[func]          muks
 	Various message IDs have been renamed to remove the word 'ERROR'
 	Various message IDs have been renamed to remove the word 'ERROR'
 	from them when they are not logged at ERROR severity level.
 	from them when they are not logged at ERROR severity level.

+ 1 - 1
src/lib/dhcpsrv/alloc_engine.cc

@@ -274,7 +274,7 @@ AllocEngine::allocateAddress4(const SubnetPtr& subnet,
     }
     }
 
 
     // Check if there's existing lease for that subnet/clientid/hwaddr combination.
     // Check if there's existing lease for that subnet/clientid/hwaddr combination.
-    Lease4Ptr existing = LeaseMgrFactory::instance().getLease4(hwaddr->hwaddr_, subnet->getID());
+    Lease4Ptr existing = LeaseMgrFactory::instance().getLease4(*hwaddr, subnet->getID());
     if (existing) {
     if (existing) {
         // We have a lease already. This is a returning client, probably after
         // We have a lease already. This is a returning client, probably after
         // its reboot.
         // its reboot.