Page MenuHomeFreeBSD

D57470.diff
No OneTemporary

D57470.diff

diff --git a/libexec/rc/rc.d/routing b/libexec/rc/rc.d/routing
--- a/libexec/rc/rc.d/routing
+++ b/libexec/rc/rc.d/routing
@@ -190,7 +190,13 @@
if [ $_skip = 0 ]; then
route_args=`get_if_var ${i%:*} route_IF`
if [ -n "$route_args" ]; then
- ${ROUTE_CMD} ${_action} ${route_args}
+ # Loopback routes may already be added by the kernel; ignore EEXIST.
+ if [ "${i%:*}" = "_loopback" ]; then
+ ${ROUTE_CMD} ${_action} ${route_args} 2>&1 >/dev/null |
+ sed -e '/route: message indicates error: File exists/d' >&2
+ else
+ ${ROUTE_CMD} ${_action} ${route_args}
+ fi
else
warn "route_${i%:*} not found."
fi
@@ -267,8 +273,15 @@
if [ $_skip = 0 ]; then
ipv6_route_args=`get_if_var ${i%:*} ipv6_route_IF`
if [ -n "$ipv6_route_args" ]; then
- ${ROUTE_CMD} ${_action} \
- -inet6 ${ipv6_route_args}
+ # Loopback routes may already be added by the kernel; ignore EEXIST.
+ if [ "${i%:*}" = "_loopback" ]; then
+ ${ROUTE_CMD} ${_action} -inet6 \
+ ${ipv6_route_args} 2>&1 >/dev/null |
+ sed -e '/route: message indicates error: File exists/d' >&2
+ else
+ ${ROUTE_CMD} ${_action} \
+ -inet6 ${ipv6_route_args}
+ fi
else
warn "route_${i%:*} not found"
fi

File Metadata

Mime Type
text/plain
Expires
Mon, Aug 24, 11:55 AM (11 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33910822
Default Alt Text
D57470.diff (1 KB)

Event Timeline