mirror of
https://github.com/QSCTech/zjunet.git
synced 2026-01-22 19:54:48 +08:00
flush lns, fixes #39
This commit is contained in:
parent
ca04f1b112
commit
b614536b6f
@ -38,6 +38,14 @@ cd zjunet
|
|||||||
sudo ./install.sh
|
sudo ./install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Known Issues
|
||||||
|
|
||||||
|
### ppp0 may disappear on openwrt
|
||||||
|
|
||||||
|
make /etc/ppp/options's lcp-echo-failure larger.
|
||||||
|
|
||||||
|
see also https://github.com/QSCTech/zjunet/issues/39
|
||||||
|
|
||||||
## Openwrt
|
## Openwrt
|
||||||
|
|
||||||
Install xl2tpd:
|
Install xl2tpd:
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VERSION=0.1.0-8
|
VERSION=0.1.0-17
|
||||||
|
|
||||||
cd debian
|
cd debian
|
||||||
./build.sh $VERSION > /dev/null
|
./build.sh $VERSION > /dev/null
|
||||||
|
|||||||
10
lib/route.sh
10
lib/route.sh
@ -56,6 +56,15 @@ if [ "${devs_count}" -eq "0" ]; then
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
flush() {
|
||||||
|
# see also: https://github.com/QSCTech/zjunet/issues/39
|
||||||
|
ip route flush 10.5.1.5
|
||||||
|
ip route flush 10.5.1.7
|
||||||
|
ip route flush 10.5.1.9
|
||||||
|
}
|
||||||
|
|
||||||
|
flush
|
||||||
|
|
||||||
ip route replace 10.5.1.0/24 via $gateway # for LNS
|
ip route replace 10.5.1.0/24 via $gateway # for LNS
|
||||||
ip route replace 10.10.0.0/24 via $gateway # for DNS
|
ip route replace 10.10.0.0/24 via $gateway # for DNS
|
||||||
|
|
||||||
@ -113,3 +122,4 @@ esac
|
|||||||
$cmd
|
$cmd
|
||||||
ip route
|
ip route
|
||||||
|
|
||||||
|
ip route
|
||||||
|
|||||||
@ -123,7 +123,7 @@ connect() {
|
|||||||
|
|
||||||
prev_count=$(ip addr show | grep 'inet.*ppp' | grep ' 10.5.' | wc -l)
|
prev_count=$(ip addr show | grep 'inet.*ppp' | grep ' 10.5.' | wc -l)
|
||||||
|
|
||||||
for i in $(seq 0 120); do
|
for i in $(seq 0 10000); do
|
||||||
|
|
||||||
tail $PPP_LOG_FILE
|
tail $PPP_LOG_FILE
|
||||||
tail $PPP_LOG_FILE >> $LOG_FILE
|
tail $PPP_LOG_FILE >> $LOG_FILE
|
||||||
@ -144,7 +144,6 @@ connect() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Fail to bring up ppp, timeout."
|
echo "Fail to bring up ppp, timeout."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user