rc: network.subr improve network6_getladdr()
In network6_getladdr() we are iterating over inet6 lines and are not interested in any others. So tell ifconfig to limit output to "inet6" as much as possible. This is probably a micro-optimisation but was noticed while looking at other IPv6-related boot-time improvements. MFC after: 1 week
This commit is contained in:
parent
5c68a21697
commit
e448ff6f0e
@ -1746,7 +1746,7 @@ network6_getladdr()
|
|||||||
_if=$1
|
_if=$1
|
||||||
_flag=$2
|
_flag=$2
|
||||||
|
|
||||||
${IFCONFIG_CMD} $_if 2>/dev/null | while read proto addr rest; do
|
${IFCONFIG_CMD} $_if inet6 2>/dev/null | while read proto addr rest; do
|
||||||
case "${proto}/${addr}/${_flag}/${rest}" in
|
case "${proto}/${addr}/${_flag}/${rest}" in
|
||||||
inet6/fe80::*//*)
|
inet6/fe80::*//*)
|
||||||
echo ${addr}
|
echo ${addr}
|
||||||
|
Loading…
Reference in New Issue
Block a user