Loopback interface visible #849
RogueWarrior65
started this conversation in
General
Replies: 2 comments 1 reply
-
A common function to enumerate interfaces is a good suggestion. One of the goals of this project is to make it easy to customize without touching code. To that end, the .json files in /config are used to store various default values. A list of filtered interfaces is a good candidate for addition to |
Beta Was this translation helpful? Give feedback.
0 replies
-
since one can basically name interfaces however one wants and have aliases and bridges and whatever, would it not be better to have a filter function or filter regexp config option? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
FYI, the lo (loopback) network interface is visible in the Hotspot page and the DHCP Server page popup menus.
exec("ip -o link show | awk -F': ' '{print $2}'", $interfaces);
in includes/dhcp.php should read:
exec("ip -o link show | awk -F': ' '{print $2}' | grep -v lo", $interfaces);
In my particular embedded system, I also have two CAN Bus interfaces (can0 and can1) which should be filtered out.
I can accomplish this by using this line instead:
exec("ip -o link show | awk -F': ' '{print $2}' | grep -v lo | grep -Ev 'can*'", $interfaces);
I also have to modify includes/networking.php and get_all_interfaces.php
exec("ls /sys/class/net | grep -v lo", $interfaces);
to
exec("ls /sys/class/net | grep -v lo | grep -Ev 'can*'", $interfaces);
There are probably a few other places where building a dynamic list of available network interfaces is done. Perhaps there should be one main function to do this.
Beta Was this translation helpful? Give feedback.
All reactions