From 8ee95213764fd3212713de85c11ebf1663ddbc6e Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 24 Jan 2023 16:00:59 +0100 Subject: [PATCH] Services: Captive Portal - for static mac assignments make sure if the ip address actually changed before updating it. --- .../scripts/OPNsense/CaptivePortal/cp-background-process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/scripts/OPNsense/CaptivePortal/cp-background-process.py b/src/opnsense/scripts/OPNsense/CaptivePortal/cp-background-process.py index e52d167c3..daf9a400b 100755 --- a/src/opnsense/scripts/OPNsense/CaptivePortal/cp-background-process.py +++ b/src/opnsense/scripts/OPNsense/CaptivePortal/cp-background-process.py @@ -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'])