mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
fix some codacy and intelliJ idea complaints
Signed-off-by: Adam Warner <adamw@rner.email>
This commit is contained in:
parent
9642cda949
commit
69dc22c10f
1 changed files with 11 additions and 5 deletions
|
@ -507,11 +507,17 @@ testIPv6() {
|
|||
# will contain 162 which is the decimal value corresponding to 0xa2
|
||||
value2=$(( (0x$first)%256 ))
|
||||
# the ULA test is testing for fc00::/7 according to RFC 4193
|
||||
(((value1&254)==252)) && echo "ULA" || true
|
||||
if (( value1&254 == 252 )); then
|
||||
echo "ULA"
|
||||
fi
|
||||
# the GUA test is testing for 2000::/3 according to RFC 4291
|
||||
(((value1&112)==32)) && echo "GUA" || true
|
||||
if (( value1&112 == 32 )); then
|
||||
echo "GUA"
|
||||
fi
|
||||
# the LL test is testing for fe80::/10 according to RFC 4193
|
||||
(((value1==254) && ((value2&192)==128))) && echo "Link-local" || true
|
||||
if (( value1 == 254 )) && (( value2&192 == 128 )); then
|
||||
echo "Link-local"
|
||||
fi
|
||||
}
|
||||
|
||||
# A dialog for showing the user about IPv6 blocking
|
||||
|
|
Loading…
Reference in a new issue