Some ifconfig's output weird inet6 loopback addresses

This commit is contained in:
Roy Marples 2008-05-28 13:38:58 +00:00
parent aaaa0b50d8
commit c409dd0570

View File

@ -235,7 +235,11 @@ _delete_addresses()
local addr= local addr=
for addr in $(LC_ALL=C ifconfig "${IFACE}" | \ for addr in $(LC_ALL=C ifconfig "${IFACE}" | \
sed -n -e 's/^.*\(inet6 addr:\|inet6\) \([^ ]*\) .*\(Scope:[^L]\|scopeid [^<]*<[^l]\).*/\2/p'); do sed -n -e 's/^.*\(inet6 addr:\|inet6\) \([^ ]*\) .*\(Scope:[^L]\|scopeid [^<]*<[^l]\).*/\2/p'); do
[ "${addr}" = "::1/128" -a "${IFACE}" = "lo" ] && continue if [ "${IFACE}" = "lo" ]; then
case "${addr}" in
"::1/128"|"/128") continue;;
esac
fi
einfo "${addr}" einfo "${addr}"
ifconfig "${IFACE}" inet6 del "${addr}" ifconfig "${IFACE}" inet6 del "${addr}"
done done