Project

General

Profile

Actions

Feature #2693

open

Allow mapping mapping non-physical interfaces via console

Added by Mathieu Simon almost 12 years ago. Updated almost 12 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Console Menu
Target version:
-
Start date:
11/27/2012
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

Description

Creating virtual interfaces via console like LAGG is another issue, that's by now only possible via gui.

The issue is that one cannot re-map a lagg to WAN, LAN or OPTx interface right now.

The "problem" is that the etc/inc/config.console.inf populates $iflist by using the default assumptions
of get_interface_list() (in etc/inc/util.inc).

If not specified, get_interface_list assumes $vfaces array with all non-physical devices including lagg.

I've fiddled out a (possible) way to allow larger choice without to heavy modification by adding
not using the default assumption of this function.
determine what device types would be helpful or not.

diff --git a/etc/inc/config.console.inc b/etc/inc/config.console.inc
index fed3948..aad1c21 100644
--- a/etc/inc/config.console.inc
+++ b/etc/inc/config.console.inc
@@ -63,7 +63,28 @@ function set_networking_interfaces_ports() {
                echo "\n";
        }

-       $iflist = get_interface_list();
+       $notmapablefaces = array (
+               'ppp',
+               'pppoe',
+               'pptp',
+               'l2tp',
+               'sl',
+               'gif',
+               'gre',
+               'faith',
+               'lo',
+               'ng',
+               'pflog',
+               'plip',
+               'pfsync',
+               'enc',
+               'tun',
+               'carp',
+               'vip',
+               'ipfw'
+       );
+
+       $iflist = get_interface_list(null, null, $notmapablefaces);

 /* Function flow is based on $key and $auto_assign or the lack thereof */      
        $key = null;

This example would allow mapping laggs and bridges.
If you are interested in such a modification change, let me know and I can prepare a pull request.

Actions

Also available in: Atom PDF