cpurc: filter ipv6 loopback address for automatic ip address setup (thanks fhs)

This commit is contained in:
cinap_lenrek 2018-10-03 00:53:10 +02:00
parent b56450471f
commit 567df638ac
2 changed files with 2 additions and 2 deletions

View file

@ -55,7 +55,7 @@ if(test -e /cfg/$sysname/cpurc)
# automatic ip address setup # automatic ip address setup
if(test -r /net/ipselftab){ if(test -r /net/ipselftab){
if(! grep u /net/ipselftab | grep -sv 127.0.0.1){ if(! grep u /net/ipselftab | grep -sv '^(127.0.0.1|::1)'){
addrs=`{ndb/query -a sys $sysname ether} addrs=`{ndb/query -a sys $sysname ether}
if(! ~ $#addrs 0){ if(! ~ $#addrs 0){
for(ether in /net/ether*){ for(ether in /net/ether*){

View file

@ -56,7 +56,7 @@ if(test -e /cfg/$sysname/termrc)
# automatic ip address setup # automatic ip address setup
if(test -r /net/ipselftab){ if(test -r /net/ipselftab){
if(! grep u /net/ipselftab | grep -sv 127.0.0.1){ if(! grep u /net/ipselftab | grep -sv '^(127.0.0.1|::1)'){
addrs=`{ndb/query -a sys $sysname ether} addrs=`{ndb/query -a sys $sysname ether}
if(! ~ $#addrs 0){ if(! ~ $#addrs 0){
for(ether in /net/ether*){ for(ether in /net/ether*){