Bug #15772
closedCaptive Portal zones can fail to start due to ID conflict
100%
Description
There seems to be a bug inside services_captiveportal.php which allows, under specific circumstances, the creation of multiple captive portal zones with the same zoneid.
Result:
The newly created captive portal zone does not start, and nginx logs "bind() to 0.0.0.0:80XX failed (48: Address already in use)".
Also, the previously existing captive portal zone with the same zoneid stops working until its configuration is re-applied (edit -> save).
How to reproduce:
- Create three captive portal zones. This results in the zoneids 2, 4, 6 to be created and saved inside the configuration in this order.
- Delete the second captive portal zone. This results in the zoneids 2, 6 being present inside the configuration in this order.
- Create one captive portal zone. This results in the zoneids 2, 6, 4 being present inside the configuration in this order.
- Create another captive portal zone. This triggers the bug and results in the zoneids 2, 6, 4, 6 being present inside the configuration in this order.
Reason:
The code inside /usr/local/www/services_captiveportal.php (lines 327-334) seems to require, that the captive portal zones inside the configuration are correctly ordered by their zoneids. If that's not the case, the zoneid conflict may occur once a new captive portal zone is created.
Updated by Christopher Cope about 1 month ago
- Status changed from New to Confirmed
I am able to reproduce this on
24.08-DEVELOPMENT (amd64) built on Thu Oct 10 12:09:00 UTC 2024 FreeBSD 15.0-CURRENT
Updated by Christopher Cope about 1 month ago
- Priority changed from High to Normal
Updated by Marcos M 24 days ago
- Project changed from pfSense Plus to pfSense
- Subject changed from Captive Portal zoneid conflict when creating a new zone to Captive Portal zones can fail to start due to ID conflict
- Category changed from Captive Portal to Captive Portal
- Status changed from Confirmed to Feedback
- Assignee set to Marcos M
- Target version set to 2.8.0
- Affected Plus Version deleted (
24.03) - Plus Target Version set to 24.11
- Affected Version set to 2.7.2
- Affected Architecture All added
- Affected Architecture deleted (
amd64)
Should be fixed with d23f3e6ce5b59b14a47c4159b3b1a71f9a9f9535.
Updated by Marcos M 24 days ago
- % Done changed from 0 to 100
Applied in changeset d23f3e6ce5b59b14a47c4159b3b1a71f9a9f9535.
Updated by Georgiy Tyutyunnik 15 days ago
- Status changed from Feedback to Resolved
reproduced on 24.08 Oct 10
fixed in the latest BETA
tested on:
24.11-BETA (amd64)
built on Fri Nov 8 7:00:00 CET 2024
FreeBSD 15.0-CURRENT