Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163465423
D56797.id177188.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D56797.id177188.diff
View Options
diff --git a/libexec/rc/rc.d/defaultroute b/libexec/rc/rc.d/defaultroute
--- a/libexec/rc/rc.d/defaultroute
+++ b/libexec/rc/rc.d/defaultroute
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Wait for the default route to be up if DHCP is in use
+# Wait for the default route to be up if DHCPv4 or IPv6 SLAAC is in use
#
#
@@ -22,7 +22,7 @@
local carrier nocarrier
carrier=1
- for _if in ${dhcp_interfaces}; do
+ for _if in ${dhcp_interfaces} ${autoconf_interfaces}; do
output=`/sbin/ifconfig ${_if}`
nocarrier=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'`
[ -z "${nocarrier}" ] && carrier=0
@@ -34,20 +34,23 @@
{
local nl waited
- afexists inet || return 0
+ afexists inet || afexists inet6 || return 0
- # Return without waiting if we don't have dhcp interfaces or
- # if none of the dhcp interfaces is plugged in.
- dhcp_interfaces=`list_net_interfaces dhcp`
- [ -z "${dhcp_interfaces}" ] && return
+ # Return without waiting if we don't have dhcp or autoconf interfaces,
+ # or if none of them is plugged in.
+ afexists inet && dhcp_interfaces=`list_net_interfaces dhcp`
+ afexists inet6 && autoconf_interfaces=`list_net_interfaces autoconf`
+ [ -z "${dhcp_interfaces}" -a -z "${autoconf_interfaces}" ] && return
# Wait for a default route
waited=0
while [ ${waited} -lt ${defaultroute_delay} ]; do
- defif=`get_default_if -inet`
- if [ -n "${defif}" ]; then
+ afexists inet && defif=`get_default_if -inet`
+ afexists inet6 && defif6=`get_default_if -inet6`
+ if [ -n "${defif}" ] || [ -n "${defif6}" ]; then
if [ ${waited} -ne 0 ]; then
- echo -n "($defif)"
+ [ -n "${defif}" ] && echo -n "($defif) => inet"
+ [ -n "${defif6}" ] && echo -n "($defif6) => inet6"
nl=1
fi
break
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 24, 10:19 AM (1 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32707561
Default Alt Text
D56797.id177188.diff (1 KB)
Attached To
Mode
D56797: defaultroute: fix dual-stack and IPv6-only handling
Attached
Detach File
Event Timeline
Log In to Comment