mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
Introduce a new method ipv6if which attemptes to figure out if an
interface is an IPv6 interface. Use this method to decide if we should attempt to configure an interface with an IPv6 address in pccard_ether. The mechanism pccard_ether uses to do this is unsuited to the task because it assumes the list of interfaces it is passed is the full list of IPv6 interfaces and makes decissions based on that. This is at least a step in the right direction and is probably about as much as we can MFC safely. PR: conf/103428 MFC after: 3 days
This commit is contained in:
parent
53d588be85
commit
6da9aa1452
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162490
|
@ -237,6 +237,30 @@ wpaif()
|
|||
return 1
|
||||
}
|
||||
|
||||
# ipv6if if
|
||||
# Returns 0 if the interface should be configured for IPv6 and
|
||||
# 1 otherwise.
|
||||
ipv6if()
|
||||
{
|
||||
if ! checkyesno ipv6_enable; then
|
||||
return 1
|
||||
fi
|
||||
case "${ipv6_network_interfaces}" in
|
||||
[Aa][Uu][Tt][Oo])
|
||||
return 0
|
||||
;;
|
||||
''|[Nn][Oo][Nn][Ee])
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
for v6if in ${ipv6_network_interfaces}; do
|
||||
if [ "${v6if}" = "${1}" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# ifexists if
|
||||
# Returns 0 if the interface exists and 1 otherwise.
|
||||
ifexists()
|
||||
|
|
|
@ -89,7 +89,11 @@ pccard_ether_start()
|
|||
fi
|
||||
|
||||
# IPv6 setup
|
||||
if checkyesno ipv6_enable; then
|
||||
if ipv6if $ifn; then
|
||||
# XXX: network6_interface_setup assumes you're calling
|
||||
# it with ALL the IPv6 interfaces at once and thus isn't
|
||||
# really appropraite for this job, but it's the best we've
|
||||
# got for now.
|
||||
network6_interface_setup $ifn
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue