mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
When a station roams between bands on the same VLAN, the vlan_remove event from the old band can arrive after the vlan_add event from the new band, causing the VLAN to be incorrectly deleted whilst still in use. Add reference counting that tracks how many interfaces are using each VLAN ID. Only create VLAN devices on the first reference and only remove them when the last reference is dropped. On startup, initialise refcounts from current station state to handle daemon restarts correctly. Signed-off-by: John Crispin <john@phrozen.org>