Merge pull request #2725 from pi-hole/fix/get-ip-similar-subnets

Fix getting IP address in the presence of similar subnets
This commit is contained in:
Mark Drobnak 2019-04-28 14:24:47 -04:00 committed by GitHub
commit b27e4c3dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -525,7 +525,7 @@ find_IPv4_information() {
fi
# Append the CIDR notation to the IP address, if valid_ip fails this should return 127.0.0.1/8
IPV4_ADDRESS=$(ip -oneline -family inet address show | grep "${IPv4bare}" | awk '{print $4}' | awk 'END {print}')
IPV4_ADDRESS=$(ip -oneline -family inet address show | grep "${IPv4bare}/" | awk '{print $4}' | awk 'END {print}')
}
# Get available interfaces that are UP