From 906cdf0215d38eea875bec82b5b1895322920eab Mon Sep 17 00:00:00 2001 From: bergware Date: Tue, 27 Jun 2023 03:37:55 +0200 Subject: [PATCH] Suppress shim interfaces in list of duplicates --- emhttp/plugins/dynamix/scripts/error_interfaces | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emhttp/plugins/dynamix/scripts/error_interfaces b/emhttp/plugins/dynamix/scripts/error_interfaces index 145e062d9..00b3b1bc1 100755 --- a/emhttp/plugins/dynamix/scripts/error_interfaces +++ b/emhttp/plugins/dynamix/scripts/error_interfaces @@ -2,13 +2,13 @@ nets=() while IFS='\n' read -r net; do net=${net%/*} - net4=$(ip -br -4 addr show to $net 2>/dev/null|awk '{print $1}'|tr '\n' ','|sed 's/,$//') + net4=$(ip -br -4 addr show to $net 2>/dev/null|awk '$1 !~ "^shim" {print $1}'|tr '\n' ','|sed 's/,$//') [[ -n $net4 ]] && nets+=("$net4 = $net;") done <<< $(ip -br -4 addr|awk '/^(br|bond|eth|wg)[0-9]+(\.[0-9]+)?/ {print $3}'|uniq -d) while IFS='\n' read -r net; do net=${net%/*} - net6=$(ip -br -6 addr show to $net 2>/dev/null|awk '{print $1}'|tr '\n' ','|sed 's/,$//') + net6=$(ip -br -6 addr show to $net 2>/dev/null|awk '$1 !~ "^shim" {print $1}'|tr '\n' ','|sed 's/,$//') [[ -n $net6 ]] && nets+=("$net6 = $net;") done <<< $(ip -br -6 addr|awk '/^(br|bond|eth|wg)[0-9]+(\.[0-9]+)?/ && $3 !~ "^fe80" {print $3}'|uniq -d)