Bug 174641
Summary: | ADSL script deletes default route | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ferenc Pal <feri> |
Component: | rp-pppoe | Assignee: | Than Ngo <than> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4 | CC: | bernd.bartmann |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-02-17 18:12:14 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ferenc Pal
2005-12-01 00:00:54 UTC
Same problem here. We've debugged this a little further. The problem lies in the adsl-connect script. Starting at line 257 you'll see this code: if test "$DEFROUTE" != "no" ; then DEFROUTE="defaultroute" # pppd will no longer delete an existing default route # so we have to help it out a little here. DEFRT=`ip route list | awk '/^default / { print $3 }'` [ -n "${DEFRT}" ] && echo $DEFRT > /etc/default-route route del default >/dev/null 2>&1 else DEFROUTE="" fi So if $DEFROUTE as read from the ifcfg-ppp* file is set to "no" it is then changed to "". The new $DEFROUTE is then used as a parameter for the pppd command line. Later in the script starting at line 332: if [ "${DEFROUTE}" != "no" ] ; then DEFRT=`ip route list | awk '/^default / { print $3 }'` [ -n "${DEFRT}" ] && echo $DEFRT > /etc/default-route route del default >/dev/null 2>&1 fi $DEFROUTE is evaluated again but this time it is no longer the value from the ifcfg-ppp* file but the changed $DEFROUTE. I consider it really bad practice to change the value of $DEFROUTE in the script. It would be better to use another variable to construct the value needed for the pppd command line. It's fixed in rp-pppoe-3.5-27.FC4.1 long ago. You should update this new package from FC4-update. You are right for FC4 but the same problem exists in RHES4 and there doesn't seem to be an errata available yet (not even in the RHES4 Q3 beta channel). Shall I open a new bug for RHES4? |