Changeset View
Changeset View
Standalone View
Standalone View
head/libexec/rc/network.subr
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | if wpaif $1; then | ||||
_cfg=0 # XXX: not sure this should count | _cfg=0 # XXX: not sure this should count | ||||
elif hostapif $1; then | elif hostapif $1; then | ||||
/etc/rc.d/hostapd start $1 | /etc/rc.d/hostapd start $1 | ||||
_cfg=0 | _cfg=0 | ||||
elif [ ${_cfg} -eq 0 ]; then | elif [ ${_cfg} -eq 0 ]; then | ||||
${IFCONFIG_CMD} $1 up | ${IFCONFIG_CMD} $1 up | ||||
fi | fi | ||||
if ! noafif $1 && afexists inet6; then | |||||
ipv6_accept_rtadv_up $1 | |||||
_cfg=0 | |||||
fi | |||||
if dhcpif $1; then | if dhcpif $1; then | ||||
if [ $_cfg -ne 0 ] ; then | if [ $_cfg -ne 0 ] ; then | ||||
${IFCONFIG_CMD} $1 up | ${IFCONFIG_CMD} $1 up | ||||
fi | fi | ||||
if syncdhcpif $1; then | if syncdhcpif $1; then | ||||
/etc/rc.d/dhclient start $1 | /etc/rc.d/dhclient start $1 | ||||
fi | fi | ||||
_cfg=0 | _cfg=0 | ||||
▲ Show 20 Lines • Show All 441 Lines • ▼ Show 20 Lines | ipv6_up() | ||||
_ret=1 | _ret=1 | ||||
if ! ipv6if $_if; then | if ! ipv6if $_if; then | ||||
return 0 | return 0 | ||||
fi | fi | ||||
ifalias ${_if} inet6 alias && _ret=0 | ifalias ${_if} inet6 alias && _ret=0 | ||||
ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 | ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 | ||||
ipv6_accept_rtadv_up ${_if} && _ret=0 | |||||
return $_ret | return $_ret | ||||
} | } | ||||
# ipv4_down if | # ipv4_down if | ||||
# remove IPv4 addresses from the interface $if | # remove IPv4 addresses from the interface $if | ||||
ipv4_down() | ipv4_down() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 495 Lines • ▼ Show 20 Lines | |||||
# ipv6_accept_rtadv_up if | # ipv6_accept_rtadv_up if | ||||
# Enable accepting Router Advertisement and send Router | # Enable accepting Router Advertisement and send Router | ||||
# Solicitation message | # Solicitation message | ||||
ipv6_accept_rtadv_up() | ipv6_accept_rtadv_up() | ||||
{ | { | ||||
if ipv6_autoconfif $1; then | if ipv6_autoconfif $1; then | ||||
${IFCONFIG_CMD} $1 inet6 accept_rtadv up | ${IFCONFIG_CMD} $1 inet6 accept_rtadv up | ||||
if ! checkyesno rtsold_enable; then | if [ -x /sbin/rtsol ]; then | ||||
rtsol ${rtsol_flags} $1 | /sbin/rtsol ${rtsol_flags} $1 | ||||
fi | fi | ||||
fi | fi | ||||
} | } | ||||
# ipv6_accept_rtadv_down if | # ipv6_accept_rtadv_down if | ||||
# Disable accepting Router Advertisement | # Disable accepting Router Advertisement | ||||
ipv6_accept_rtadv_down() | ipv6_accept_rtadv_down() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 546 Lines • Show Last 20 Lines |