diff options
Diffstat (limited to 'tools/hotplug/Linux/vif-common.sh')
-rw-r--r-- | tools/hotplug/Linux/vif-common.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hotplug/Linux/vif-common.sh b/tools/hotplug/Linux/vif-common.sh index a8bd19a6a3..73ee24150a 100644 --- a/tools/hotplug/Linux/vif-common.sh +++ b/tools/hotplug/Linux/vif-common.sh @@ -189,7 +189,7 @@ handle_iptable() # ip_of() { - ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed -n '1 s,/.*,,p' + ip -4 -o addr show primary dev "$1" | awk '$3 == "inet" {split($4,i,"/"); print i[1]; exit}' } |