Merge "Fix is_local_ip matching"

This commit is contained in:
Jenkins 2016-06-13 17:02:27 +00:00 committed by Gerrit Code Review
commit 5feb9018d4
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ function get_metadata_ip() {
function is_local_ip() {
local IP_TO_CHECK=$1
if ip a | grep ^\ *inet | grep $IP_TO_CHECK &>/dev/null; then
if ip -o a | grep "inet6\? $IP_TO_CHECK/" &>/dev/null; then
return 0
else
return 1