Project

General

Profile

Actions

Feature #10890

open

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

Added by Joe Slent about 4 years ago. Updated about 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

Also available in: Atom PDF