1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 06:08:21 +00:00

Add back CIDR notation for non-natural blocks. Includes multi-address

configs.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-01-19 13:50:42 -08:00
parent 2981f3cbd1
commit 86052540d9
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC

View File

@ -173,7 +173,8 @@ find_IPv4_information() {
# Find IP used to route to outside world
route=$(ip route get 8.8.8.8)
IPv4dev=$(awk '{for (i=1; i<=NF; i++) if ($i~/dev/) print $(i+1)}' <<< "${route}")
IPV4_ADDRESS=$(awk '{print $7}' <<< "${route}")
IPv4bare=$(awk '{print $7}' <<< "${route}")
IPV4_ADDRESS=$(ip -o -f inet addr show | grep "${IPv4bare}" | awk '{print $4}' | awk 'END {print}')
IPv4gw=$(awk '{print $3}' <<< "${route}")
}