Project

General

Profile

Actions

Bug #15772

closed

Captive Portal zones can fail to start due to ID conflict

Added by Paul Kutzer 3 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Captive Portal
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
24.11
Release Notes:
Default
Affected Version:
2.7.2
Affected Architecture:
All

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.

Actions #1

Updated by Christopher Cope 2 months 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

Actions #2

Updated by Christopher Cope 2 months ago

  • Priority changed from High to Normal
Actions #3

Updated by Marcos M about 2 months 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)
Actions #4

Updated by Marcos M about 2 months ago

  • % Done changed from 0 to 100
Actions #5

Updated by Georgiy Tyutyunnik about 2 months 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

Actions

Also available in: Atom PDF