shithub: riscv

Download patch

ref: 8d9f3906fa94676f4e788a9668991b815b4f5542
parent: 41d4cecf6d55af3ee0ced4c45d34450f4501608b
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Mar 27 10:11:25 EDT 2019

plan9.ini: add nora6= option to disable automatic ipv6 configuration

--- a/rc/bin/cpurc
+++ b/rc/bin/cpurc
@@ -65,7 +65,7 @@
 					# try /lib/ndb first, then do dhcp/slaac
 					ip/ipconfig -6 ether $ether
 					ip/ipconfig -N ether $ether >[2]/dev/null || @{
-						ip/ipconfig ether $ether ra6 recvra 1 &
+						test -e /env/nora6 || ip/ipconfig ether $ether ra6 recvra 1 &
 						ip/ipconfig -h $sysname ether $ether &
 						wait
 					}
--- a/rc/bin/termrc
+++ b/rc/bin/termrc
@@ -66,7 +66,7 @@
 					# try /lib/ndb first, then do dhcp/slaac
 					ip/ipconfig -6 ether $ether
 					ip/ipconfig -N ether $ether >[2]/dev/null || @{
-						ip/ipconfig ether $ether ra6 recvra 1 &
+						test -e /env/nora6 || ip/ipconfig ether $ether ra6 recvra 1 &
 						ip/ipconfig -h $sysname ether $ether &
 						wait
 					}
--- a/sys/man/8/plan9.ini
+++ b/sys/man/8/plan9.ini
@@ -443,6 +443,8 @@
 or
 .B /boot. 
 See iwl section above for configuration details.
+.SS \fLnora6=
+Disable automatic IPv6 configuration from incoming router advertisements.
 .SS DISKS, TAPES
 (S)ATA controllers are autodetected.
 .SS \fL*nodma=\fP
--- a/sys/src/9/boot/net.rc
+++ b/sys/src/9/boot/net.rc
@@ -17,7 +17,7 @@
 
 	if(~ $1 ether && ~ $#* 2) @{
 		ip/ipconfig -6 $*
-		ip/ipconfig $* ra6 recvra 1 &
+		test -e /env/nora6 || ip/ipconfig $* ra6 recvra 1 &
 		ip/ipconfig -p $* &
 		wait
 	}