From baca28ece3e737d53b93e099142b122d72a38191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= Date: Wed, 20 Jul 2022 13:22:30 +0200 Subject: [PATCH] fff-web-ui: fix port selection for TWO_PORT devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Support for devices with two ports was originally intended for built-in swconfig switches with only two externally exposed ethernet ports. With the switch from ath71xx to ath79, the only device which ever made use of this uncommon configuration (CPE210-v1) now has to dedicated interfaces exposed to Linux. Therefore, two-port support was modified to support two distinct interfaces instead of swconfig switch configuration, which also simplified support for a few other devices. However, the Web UI has not been taken into account. Due to the way the Web UI detected a two-port device, the already implemented port selector is not shown. Use the TWO_PORT variable introduced with the change mentioned above to detect two-port devices instead. Fixes: #257 Fixes: c22032e25430 ("fff-network: support native two-port devices") Signed-off-by: Fabian Bläse Reviewed-by: Robert Langhammer --- src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/ports.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/ports.html b/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/ports.html index 3725a1c0..c392c8f2 100755 --- a/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/ports.html +++ b/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/ports.html @@ -187,7 +187,7 @@ format_port() { <% fi %> -<% if grep -q "LAN0PORT" "/etc/network.$board_name" || grep -q "LAN1PORT" "/etc/network.$board_name" ; then %> +<% if grep -q "TWO_PORT" "/etc/network.$board_name" ; then %> <% # Device has two ports . /etc/network.mode