Remove ipv6 host addresses from list

This commit is contained in:
bergware
2023-08-13 13:33:25 +02:00
parent c90c7ade0e
commit 2f396ccb68
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -150,7 +150,7 @@ wipe() {
# remove temporary (privacy extensions) and host ipv6 addresses
for tmp in $(ip -br -6 addr show scope global temporary dev $wet 2>/dev/null|awk '{$1=$2="";print}'); do
for i in ${!wet[@]}; do
[[ ${wet[$i]} == $tmp || ${wet[$i]#*/} == 128 ]] && unset 'wet[i]'
[[ ${wet[$i]} == $tmp || (${wet[$i]} =~ '::' && ${wet[$i]#*/} == 128) ]] && unset 'wet[i]'
done
done
# return cleaned-up list without interface name
+1 -1
View File
@@ -92,7 +92,7 @@ wipe() {
# remove temporary (privacy extensions) and host ipv6 addresses
for tmp in $(ip -br -6 addr show scope global temporary dev $wet 2>/dev/null|awk '{$1=$2="";print}'); do
for i in ${!wet[@]}; do
[[ ${wet[$i]} == $tmp || ${wet[$i]#*/} == 128 ]] && unset 'wet[i]'
[[ ${wet[$i]} == $tmp || (${wet[$i]} =~ '::' && ${wet[$i]#*/} == 128) ]] && unset 'wet[i]'
done
done
# return cleaned-up list without interface name