route table is ALWAYS nonsense after PPTP connection from network-manager-pptp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
network-manager-pptp (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Dear developers,
I tried to connect to my school with network-
-------
hearson@
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
128.210.239.21 192.168.0.1 255.255.255.255 UGH 0 0 0 ath0
128.210.239.21 192.168.0.1 255.255.255.255 UGH 0 0 0 ath0
192.168.0.0 0.0.0.0 255.255.255.0 U 2 0 0 ath0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
hearson@
hearson@
ppp0 Link encap:Point-
inet addr:128.
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1496 Metric:1
RX packets:421 errors:0 dropped:0 overruns:0 frame:0
TX packets:521 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:105108 (105.1 KB) TX bytes:140946 (140.9 KB)
hearson@
hearson@
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
128.210.239.21 192.168.0.1 255.255.255.255 UGH 0 0 0 ath0
128.210.239.21 192.168.0.1 255.255.255.255 UGH 0 0 0 ath0
192.168.0.0 0.0.0.0 255.255.255.0 U 2 0 0 ath0
0.0.0.0 128.210.192.137 0.0.0.0 UG 0 0 0 ppp0
hearson@
PING 208.67.222.222 (208.67.222.222) 56(84) bytes of data.
64 bytes from 208.67.222.222: icmp_seq=1 ttl=54 time=263 ms
64 bytes from 208.67.222.222: icmp_seq=2 ttl=54 time=263 ms
^C
--- 208.67.222.222 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1006ms
rtt min/avg/max/mdev = 263.088/
-------
Meanwhile, before I start PPTP connection, I modified my /etc/ppp/ip-up like this
=======
#!/bin/sh
#
# This script is run by the pppd after the link is established.
# It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes,
# set IP address, run the mailq etc. you should create script(s) there.
#
# Be aware that other packages may include /etc/ppp/ip-up.d scripts (named
# after that package), so choose local script names with that in mind.
#
# This script is called with the following arguments:
# Arg Name Example
# $1 Interface name ppp0
# $2 The tty ttyS1
# $3 The link speed 38400
# $4 Local IP number 12.34.56.78
# $5 Peer IP number 12.34.56.99
# $6 Optional ``ipparam'' value foo
# The environment is cleared before executing this script
# so the path must be reset
PATH=/usr/
export PATH
# These variables are for the use of the scripts run by run-parts
PPP_IFACE="$1"
PPP_TTY="$2"
PPP_SPEED="$3"
PPP_LOCAL="$4"
PPP_REMOTE="$5"
PPP_IPPARAM="$6"
export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
# as an additional convenience, $PPP_TTYNAME is set to the tty name,
# stripped of /dev/ (if present) for easier matching.
PPP_TTYNAME=
export PPP_TTYNAME
# If /var/log/
if [ -e /var/log/
exec > /var/log/
echo $0 $*
echo
fi
# This script can be used to override the .d files supplied by other packages.
if [ -x /etc/ppp/
exec /etc/ppp/
fi
run-parts /etc/ppp/ip-up.d \
--arg="$1" --arg="$2" --arg="$3" --arg="$4" --arg="$5" --arg="$6"
# if pon was called with the "quick" argument, stop pppd
if [ -e /var/run/ppp-quick ]; then
rm /var/run/ppp-quick
wait
kill $PPPD_PID
fi
env >/route.txt
route -n >>/route.txt
route del default
route add default gw $IPLOCAL dev $IFNAME
route -n >>/route.txt
=======
Thus, I attempted to correct the route table after the PPTP connection was established. And the /route.txt is,
=======
PPP_TTY=
DNS1=128.210.11.57
IFNAME=ppp0
DNS2=128.210.11.5
IPLOCAL=
PPPLOGNAME=root
PPP_REMOTE=
PPP_IFACE=ppp0
PPP_TTYNAME=
ORIG_UID=0
USEPEERDNS=1
SPEED=38400
PATH=/usr/
IPREMOTE=
PPP_LOCAL=
PPP_IPPARAM=
PPPD_PID=8626
PWD=/
PPP_SPEED=38400
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
128.210.239.21 192.168.0.1 255.255.255.255 UGH 0 0 0 ath0
128.210.239.21 192.168.0.1 255.255.255.255 UGH 0 0 0 ath0
192.168.0.0 0.0.0.0 255.255.255.0 U 2 0 0 ath0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ath0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
128.210.239.21 192.168.0.1 255.255.255.255 UGH 0 0 0 ath0
128.210.239.21 192.168.0.1 255.255.255.255 UGH 0 0 0 ath0
192.168.0.0 0.0.0.0 255.255.255.0 U 2 0 0 ath0
0.0.0.0 128.210.192.137 0.0.0.0 UG 0 0 0 ppp0
=======
You can see the route table became correct for a while when it was still running the scripts. After that, the route table immediately became nonsense (no matter whether I modified the `ip-up' script or not).
My system is up-to-date. Please help me get rid of this situation. Thanks a lot!