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

Merge pull request #2498 from pi-hole/fix/IPv6_string

Change field from digit to string for printf
This commit is contained in:
DL6ER 2018-11-08 20:28:24 +01:00 committed by GitHub
commit 9fa497b056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -617,7 +617,7 @@ chooseInterface() {
# See https://github.com/pi-hole/pi-hole/issues/1473#issuecomment-301745953
testIPv6() {
# first will contain fda2 (ULA)
printf -v first "%d" "${1%%:*}"
printf -v first "%s" "${1%%:*}"
# value1 will contain 253 which is the decimal value corresponding to 0xfd
value1=$(( (0x$first)/256 ))
# will contain 162 which is the decimal value corresponding to 0xa2