From 9e24d46ae6eb52ca5f86fa53ac35355066683fb4 Mon Sep 17 00:00:00 2001 From: Assaf Giladi Date: Mon, 15 Dec 2025 13:59:36 +0200 Subject: [PATCH] fix: use only nic name for azure --- bash_functions/get_bash_function.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bash_functions/get_bash_function.go b/bash_functions/get_bash_function.go index d333bbd..cd8b4ea 100644 --- a/bash_functions/get_bash_function.go +++ b/bash_functions/get_bash_function.go @@ -88,9 +88,12 @@ func GetNetStrForDpdk() string { continue fi enp=$(ls -l /sys/class/net/$interface/ | grep lower | awk -F"_" '{print $2}' | awk '{print $1}') #for azure - if [ -z $enp ];then - enp=$(ethtool -i $interface | grep bus-info | awk '{print $2}') #pci for gcp + if [ -n "$enp" ]; then + net="$net --net $enp" #azure + continue fi + + enp=$(ethtool -i $interface | grep bus-info | awk '{print $2}') #pci for gcp bits=$(ip -o -f inet addr show $interface | awk '{print $4}') IFS='/' read -ra netmask <<< "$bits"