changeset 25187:7f91229320ca

OS-8196 Native zone support for link-local routes (#281) Reviewed by: Jason King <jason.king@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
author Bill Welliver <bill@welliver.org>
date Thu, 09 Jul 2020 15:05:05 -0400
parents edddd0e6f593
children b0e40b18bed0
files usr/src/cmd/svc/milestone/net-routing-setup
diffstat 1 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/svc/milestone/net-routing-setup	Thu Jul 09 11:42:13 2020 +0000
+++ b/usr/src/cmd/svc/milestone/net-routing-setup	Thu Jul 09 15:05:05 2020 -0400
@@ -84,6 +84,17 @@
 #
 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`
@@ -216,11 +227,12 @@
 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