Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,14 @@ function isVlanFilteringEnabled(deviceSection) {
return has_vlans;
}

/* A bridge qualifies only when every member resolves to a physical
* ethernet/DSA port. Bridges spanning wifi APs, tunnels, wireguard, VLAN
* sub-interfaces or nested bridges are excluded on purpose — they're legal
* vlan-aware bridges but the T/U-on-physical-ports UI doesn't apply. */
/* A bridge qualifies when it has at least one member and every member
* resolves to a physical ethernet/DSA port. Bridges spanning tunnels,
* wireguard, VLAN sub-interfaces or nested bridges are excluded on purpose —
* they're legal vlan-aware bridges but the T/U-on-physical-ports UI doesn't
* apply. Wireless members are not a disqualifier: netifd joins every AP of a
* wireless network attached to the bridge, which would otherwise hide this
* view on any device with Wi-Fi on the LAN bridge. collectBridgePorts() drops
* them from the list, so only genuine virtual members veto the bridge. */
function findActiveBridge() {
let match = null;

Expand Down Expand Up @@ -173,7 +177,12 @@ function collectBridgePorts(deviceSection) {
});
}

return Object.keys(seen).sort(L.naturalCompare);
/* AP pseudo-interfaces are ordinary bridge members but their VLAN role is
* derived from the wireless configuration, not from this view, so they are
* not offered as editable port tiles. */
return Object.keys(seen).filter(function(name) {
return network.instantiateDevice(name).getType() !== 'wifi';
}).sort(L.naturalCompare);
}

function collectBridgeVlans(deviceSection) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* Switch/VLAN configuration view.
*
* Operates on a single vlan-aware bridge identified by bvtool.findActiveBridge
* (every member must be a physical ethernet/DSA port). Renders two blocks:
* (wireless members are ignored, every other member must be a physical
* ethernet/DSA port). Renders two blocks:
* a Ports section (clickable port tiles whose selection drives the rest of the
* view) and a VLANs section (one row per bridge-vlan with tri-state T/U
* buttons that assign/remove tagged/untagged membership across the current
Expand Down Expand Up @@ -68,7 +69,7 @@ function renderNoBridgeBlocker() {
E('h2', _('Switch / VLAN Configuration')),
E('div', { 'class': 'alert-message warning' }, [
E('h4', _('No managed switch found')),
E('p', _('No bridge eligible for switch-style configuration was found. This view requires a bridge with VLAN filtering enabled (explicitly or implicitly via bridge-vlan sections) whose member ports are all physical ethernet or DSA switch ports. Bridges containing wireless, tunnel, VLAN sub-interfaces or other virtual members are intentionally excluded.')),
E('p', _('No bridge eligible for switch-style configuration was found. This view requires a bridge with VLAN filtering enabled (explicitly or implicitly via bridge-vlan sections) whose member ports are all physical ethernet or DSA switch ports. Bridges containing tunnel, VLAN sub-interfaces or other virtual members are intentionally excluded; wireless members are ignored.')),
E('p', [
_('You can enable VLAN filtering on a bridge from the '),
E('a', { 'href': L.url('admin/network/network') }, _('Interfaces → Devices')),
Expand Down