Skip to content

Commit 5c9828d

Browse files
committed
CLOUDSTACK-2804 getEthByIp function in vpc_func.sh can return the wrong
network interface
1 parent 54127f8 commit 5c9828d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • patches/systemvm/debian/config/opt/cloud/bin

‎patches/systemvm/debian/config/opt/cloud/bin/vpc_func.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ getEthByIp (){
2222
local ip=$1
2323
for dev in `ls -1 /sys/class/net | grep eth`
2424
do
25-
sudo ip addr show dev $dev | grep $ip > /dev/null
25+
sudo ip addr show dev $dev | grep $ip\/ > /dev/null
2626
if [ $? -eq 0 ]
2727
then
2828
echo $dev

0 commit comments

Comments
 (0)