Browse Source

dnsping_v6: filter the private prefixes with :: to avoid catching addresses that have these somewhere in the middle

Helmut Pozimski 7 years ago
parent
commit
9799509da3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dnsping/dnsping_v6.sh

+ 1 - 1
dnsping/dnsping_v6.sh

@@ -14,7 +14,7 @@ else
 	old_addr=""
 fi
 
-new_addr=$(ip -o -6 addr | grep -v -e fc00 -e fd00 | grep global | grep -v "preferred_lft 0sec" | grep -v temporary | awk '{print $4}' | cut -d "/" -f 1)
+new_addr=$(ip -o -6 addr | grep -v -e fc00:: -e fd00:: | grep global | grep -v "preferred_lft 0sec" | grep -v temporary | awk '{print $4}' | cut -d "/" -f 1)
 
 if [ "$old_addr" != "$new_addr" ];
 then