1
0
mirror of https://github.com/QSCTech/zjunet.git synced 2026-01-22 03:34:48 +08:00

flush lns, fixes #39

This commit is contained in:
Zeno Zeng 2014-10-01 04:10:17 +08:00
parent ca04f1b112
commit b614536b6f
4 changed files with 20 additions and 3 deletions

View File

@ -38,6 +38,14 @@ cd zjunet
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
Install xl2tpd:

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=0.1.0-8
VERSION=0.1.0-17
cd debian
./build.sh $VERSION > /dev/null

View File

@ -56,6 +56,15 @@ if [ "${devs_count}" -eq "0" ]; then
return
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.10.0.0/24 via $gateway # for DNS
@ -113,3 +122,4 @@ esac
$cmd
ip route
ip route

View File

@ -123,7 +123,7 @@ connect() {
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 >> $LOG_FILE
@ -144,7 +144,6 @@ connect() {
return
fi
sleep 1
done
echo "Fail to bring up ppp, timeout."