Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2012 22:08:03 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r232904 - stable/9/etc/rc.d
Message-ID:  <201203122208.q2CM8351089350@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Mon Mar 12 22:08:03 2012
New Revision: 232904
URL: http://svn.freebsd.org/changeset/base/232904

Log:
  MFC r232515:
  
   Rather than printing the output from route add for all FIBs just print them
   for the default FIB followed by a statement with a list of FIB numbers for
   all the other FIBs we install the routes for.
  
   Request by:	kib (to make it less noisy)
  Tested by:	kib

Modified:
  stable/9/etc/rc.d/routing
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/rc.d/routing
==============================================================================
--- stable/9/etc/rc.d/routing	Mon Mar 12 22:05:50 2012	(r232903)
+++ stable/9/etc/rc.d/routing	Mon Mar 12 22:08:03 2012	(r232904)
@@ -145,14 +145,21 @@ static_inet6()
 	: ${fibs:=1}
 
 	# disallow "internal" addresses to appear on the wire
-	i=0
-	while test ${i} -lt ${fibs}; do
-		setfib -F ${i} route ${_action} \
-		    -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
-		setfib -F ${i} route ${_action} \
-		    -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
-		i=$((i + 1))
-	done
+	route ${_action} -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
+	route ${_action} -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
+	i=1
+	if test ${i} -lt ${fibs}; then
+		printf "Also installing reject routes for FIBs"
+		while test ${i} -lt ${fibs}; do
+			setfib -F ${i} route -q ${_action} \
+			    -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
+			setfib -F ${i} route -q ${_action} \
+			    -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
+			printf " %d" ${i}
+			i=$((i + 1))
+		done
+		printf "\n"
+	fi
 
 	case ${ipv6_defaultrouter} in
 	[Nn][Oo] | '')
@@ -224,14 +231,21 @@ static_inet6()
 	# for the host case, you will allow to omit the identifiers.
 	# Under this configuration, the packets will go to the default
 	# interface.
-	i=0
-	while test ${i} -lt ${fibs}; do
-		setfib -F ${i} route ${_action} \
-		    -inet6 fe80:: -prefixlen 10 ::1 -reject
-		setfib -F ${i} route ${_action} \
-		    -inet6 ff02:: -prefixlen 16 ::1 -reject
-		i=$((i + 1))
-	done
+	route ${_action} -inet6 fe80:: -prefixlen 10 ::1 -reject
+	route ${_action} -inet6 ff02:: -prefixlen 16 ::1 -reject
+	i=1
+	if test ${i} -lt ${fibs}; then
+		printf "Also installing reject routes for FIBs"
+		while test ${i} -lt ${fibs}; do
+			setfib -F ${i} route -q ${_action} \
+			    -inet6 fe80:: -prefixlen 10 ::1 -reject
+			setfib -F ${i} route -q ${_action} \
+			    -inet6 ff02:: -prefixlen 16 ::1 -reject
+			printf " %d" ${i}
+			i=$((i + 1))
+		done
+		printf "\n"
+	fi
 
 	case ${ipv6_default_interface} in
 	'')



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203122208.q2CM8351089350>