Project

General

Profile

Actions

Feature #10890

open

Allow multiple assigned interfaces to track status of a single switch port

Added by Joe Slent over 4 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Interfaces
Target version:
-
Start date:
09/12/2020
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

Description

Let's assume we use PortX on a switch to trunk VLAN_1, VLAN_2, .., VLAN_N.
On each of these interfaces, we have two options when selecting the "Switch Port" (interfaces.php):
- Option 1: you leave it as default (Select the Switch port to monitor for media state changes). However if this is done, the interface is always up, even if the physical port is down. This might be expected even if one could theoretically determine from switch_vlans.php's settings what to display.
- Option 2: (here resides the bug) you select a specific port. However, I can only do this once, so only in one VLAN. I should be able to do it multiple times in case of trunking.

This is due to a specific check in interfaces.php:

        /* Switch if cannot be reused. */
        if (is_array($config['interfaces']) && isset($_POST['switchif'])) {
            foreach ($config['interfaces'] as $int) {
                if (!empty($_POST['switchif']) && ($int != $wancfg && $int['switchif'] == $_POST['switchif'])) {
                    $input_errors[] = gettext("This Switch port is already in used by another interface.");
                    break;
                }
            }
        }


Files

option2.png (16.6 KB) option2.png Error given when trying to select the same port Joe Slent, 09/12/2020 02:36 AM
Actions #1

Updated by Jim Pingle over 4 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from Switch port assignment in interface is not working if port is used as trunk to Allow multiple assigned interfaces to track status of a single switch port
  • Affected Version deleted (2.4.5-p1)
  • Affected Architecture deleted (SG-1100, SG-2100, SG-3100)

Not really a bug, but a feature request.

Actions

Also available in: Atom PDF