diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-08-15 21:39:30 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-08-15 21:39:30 +0200 |
commit | cd752a39f8b0b36378800740c0e5915beabfb56d (patch) | |
tree | b1c2b1c531321704e49928e0771dac90badef186 /sys/src/9/boot | |
parent | ab4c0a012f4b57e9a9a2c084097c919a40029380 (diff) |
ipv6 autoconfiguration on ethernet
for ip autoconfiguration, setup ipv6 link local addresses
and do SLAAC in parallel to DHCP.
Diffstat (limited to 'sys/src/9/boot')
-rwxr-xr-x | sys/src/9/boot/net.rc | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/sys/src/9/boot/net.rc b/sys/src/9/boot/net.rc index 27458081a..79c0b81fa 100755 --- a/sys/src/9/boot/net.rc +++ b/sys/src/9/boot/net.rc @@ -15,7 +15,16 @@ fn confignet{ } } - must ip/ipconfig -p $* + if(~ $1 ether && ~ $#* 2) @{ + ip/ipconfig -6 $* + ip/ipconfig $* ra6 recvra 1 & + ip/ipconfig -p $* & + wait + } + if not { + ip/ipconfig -p $* + } + if(~ $#fs 0) fs=`{awk -F'=' '/^[ ]*fs=/{print $2}' /net/ndb} if(~ $#auth 0) @@ -33,13 +42,13 @@ fn confignet{ } } - # set bootstrap authservers for factotum - if(! ~ $#auth 0){ - grep -v '^[ ]*auth=' /net/ndb >/env/x - cat /env/x <{echo ' auth='^$auth^' -'} >/net/ndb - rm /env/x - } + # publish info in /net/ndb for factotum + >> /net/ndb { + echo + echo 'ipbootinfo=' + for(i in $fs) echo ' fs='^$i + for(i in $auth) echo ' auth='^$i + } } fn connecttcp{ |