mirror of
https://github.com/unraid/webgui.git
synced 2026-01-16 22:50:19 -06:00
Remove ipv6 host addresses from list
This commit is contained in:
@@ -147,10 +147,10 @@ min6() {
|
||||
|
||||
wipe() {
|
||||
wet=($*)
|
||||
# remove temporary (privacy extensions) ipv6 addresses
|
||||
# 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 ]] && unset 'wet[i]'
|
||||
[[ ${wet[$i]} == $tmp || ${wet[$i]#*/} == 128 ]] && unset 'wet[i]'
|
||||
done
|
||||
done
|
||||
# return cleaned-up list without interface name
|
||||
|
||||
@@ -89,10 +89,10 @@ min6() {
|
||||
|
||||
wipe() {
|
||||
wet=($*)
|
||||
# remove temporary (privacy extensions) ipv6 addresses
|
||||
# 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 ]] && unset 'wet[i]'
|
||||
[[ ${wet[$i]} == $tmp || ${wet[$i]#*/} == 128 ]] && unset 'wet[i]'
|
||||
done
|
||||
done
|
||||
# return cleaned-up list without interface name
|
||||
|
||||
Reference in New Issue
Block a user