CLOUDSTACK-2804 getEthByIp function in vpc_func.sh can return the wrong network interface
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/45b691a6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/45b691a6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/45b691a6 Branch: refs/heads/4.1.1-sbp Commit: 45b691a6c14716dfeb761ebb1364325d4dba5318 Parents: 5702b9b Author: Hugo Trippaers <[email protected]> Authored: Mon Jun 3 10:52:41 2013 +0200 Committer: Hugo Trippaers <[email protected]> Committed: Mon Jul 1 13:48:38 2013 +0200 ---------------------------------------------------------------------- patches/systemvm/debian/config/opt/cloud/bin/vpc_func.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/45b691a6/patches/systemvm/debian/config/opt/cloud/bin/vpc_func.sh ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/opt/cloud/bin/vpc_func.sh b/patches/systemvm/debian/config/opt/cloud/bin/vpc_func.sh index 17cb078..2f88351 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/vpc_func.sh +++ b/patches/systemvm/debian/config/opt/cloud/bin/vpc_func.sh @@ -22,7 +22,7 @@ getEthByIp (){ local ip=$1 for dev in `ls -1 /sys/class/net | grep eth` do - sudo ip addr show dev $dev | grep $ip > /dev/null + sudo ip addr show dev $dev | grep $ip\/ > /dev/null if [ $? -eq 0 ] then echo $dev
