mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
ethermultilink: ignore link-status of primary
when link-status on secondary is lost, always switch back to the primary regardless of if it has a link. this works around some ethernet driver not setting link-status consistently and wifi's that might only indicate a link when connected to an ap.
This commit is contained in:
parent
b8604dd760
commit
7137060d85
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ for(i){
|
|||
|
||||
# first interface is the primary
|
||||
primary=$1
|
||||
shift
|
||||
|
||||
net=`{echo $primary | sed 's!/*[^/]*$!!g'}
|
||||
test -r $net/arp || missing $net/arp
|
||||
|
@ -32,9 +33,9 @@ test -r $net/arp || missing $net/arp
|
|||
# now select secondary from the list depending on link status
|
||||
@{
|
||||
old=/dev/null
|
||||
new=$old
|
||||
while(){
|
||||
# interfaces are in increasing priority order
|
||||
new=$primary
|
||||
for(i){
|
||||
if(grep -s 'link: 1' $i/stats)
|
||||
new=$i
|
||||
|
|
Loading…
Reference in a new issue