Skip to content

Commit

Permalink
OS-8196 Native zone support for link-local routes (#281)
Browse files Browse the repository at this point in the history
Reviewed by: Jason King <jason.king@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
hww3 committed Jul 9, 2020
1 parent 466fd23 commit 34dbf83
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions usr/src/cmd/svc/milestone/net-routing-setup
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ fi
#
smf_netstrategy

#
# Read /etc/inet/static_routes.vmadm and add each link-local route.
#
if [ -f /etc/inet/static_routes.vmadm ]; then
echo "Adding vmadm persistent link-local routes:"
/usr/bin/egrep -v "^(#|$)" /etc/inet/static_routes.vmadm |
/usr/bin/grep -- "-interface " | while read line; do
/usr/sbin/route add $line
done
fi

if [ "$_INIT_NET_STRATEGY" = "dhcp" ] && \
[ -n "`/sbin/dhcpinfo Router`" ]; then
defrouters=`/sbin/dhcpinfo Router`
Expand Down Expand Up @@ -216,11 +227,12 @@ if [ -f /etc/inet/static_routes ]; then
fi

#
# Read /etc/inet/static_routes.vmadm and add each route.
# Read /etc/inet/static_routes.vmadm and add each non-link-local route.
#
if [ -f /etc/inet/static_routes.vmadm ]; then
echo "Adding vmadm persistent routes:"
/usr/bin/egrep -v "^(#|$)" /etc/inet/static_routes.vmadm | while read line; do
/usr/bin/egrep -v "^(#|$)" /etc/inet/static_routes.vmadm |
/usr/bin/grep -v -- "-interface " | while read line; do
/usr/sbin/route add $line
done
fi
Expand Down

0 comments on commit 34dbf83

Please sign in to comment.