mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
Services: Captive Portal - for static mac assignments make sure if the ip address actually changed before updating it.
This commit is contained in:
parent
44e9dc25b8
commit
8ee9521376
@ -156,7 +156,7 @@ class CPBackgroundProcess(object):
|
||||
elif db_client['authenticated_via'] == '---mac---':
|
||||
# detect mac changes
|
||||
current_ip = self.arp.get_address_by_mac(db_client['macAddress'])
|
||||
if current_ip is not None:
|
||||
if current_ip is not None and db_client['ipAddress'] != current_ip:
|
||||
if db_client['ipAddress'] != '':
|
||||
# remove old ip
|
||||
self.ipfw.delete(zoneid, db_client['ipAddress'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user