Bug 152014 - adsl-connect ignores DEFROUTE=no
adsl-connect ignores DEFROUTE=no
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rp-pppoe (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-24 07:56 EST by Eric Yeo
Modified: 2013-01-21 12:49 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-15 02:41:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Yeo 2005-03-24 07:56:23 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Description of problem:
If DEFROUTE=no is set in /etc/sysconfig/network-scripts/ifcfg-XXX, the default route is still set when pppoe is started.

Version-Release number of selected component (if applicable):
rp-pppoe-3.5-22

How reproducible:
Always

Steps to Reproduce:
1. Start ADSL  

Actual Results:  Default route is set

Expected Results:  Default route should not be set

Additional info:

I have found the bug to be in /sbin/adsl-connect. The variable DEFROUTE is overridden for another purpose. The patch of my solution follows. Please patch it in your rpm.

*** adsl-connect-keep   2005-03-24 23:41:10.043619171 +1100
--- adsl-connect        2005-03-24 18:45:39.969440649 +1100
***************
*** 255,272 ****
      modprobe pppoatm > /dev/null 2>&1
  fi
  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
  
  # Standard PPP options we always use
! PPP_STD_OPTIONS="$IPPARAM $LINKNAME $PLUGIN_OPTS noipdefault noauth default-asyncmap $DEFROUTE hide-password nodetach $PEERDNS mtu $MTU mru $MRU noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp user $USER lcp-echo-interval $LCP_INTERVAL lcp-echo-failure $LCP_FAILURE $PPPD_EXTRA"
  
  # PPPoE invocation
  PPPOE_CMD="$PPPOE -p $PPPOE_PIDFILE -I $ETH -T $PPPOE_TIMEOUT -U $PPPOE_SYNC $CLAMPMSS $ACNAME $SERVICENAME $PPPOE_EXTRA"
--- 255,272 ----
      modprobe pppoatm > /dev/null 2>&1
  fi
  if test "$DEFROUTE" != "no" ; then
!     DEFAULTROUTE="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
!     DEFAULTROUTE=""
  fi
  
  # Standard PPP options we always use
! PPP_STD_OPTIONS="$IPPARAM $LINKNAME $PLUGIN_OPTS noipdefault noauth default-asyncmap $DEFAULTROUTE hide-password nodetach $PEERDNS mtu $MTU mru $MRU noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp user $USER lcp-echo-interval $LCP_INTERVAL lcp-echo-failure $LCP_FAILURE $PPPD_EXTRA"
  
  # PPPoE invocation
  PPPOE_CMD="$PPPOE -p $PPPOE_PIDFILE -I $ETH -T $PPPOE_TIMEOUT -U $PPPOE_SYNC $CLAMPMSS $ACNAME $SERVICENAME $PPPOE_EXTRA"
Comment 1 Doug Kennedy 2005-08-15 00:36:30 EDT
I have a similar problem in FC4. 

1. the default route is some gateway address on eth0.  ppp0 is down.
2. DEFROUTE=no is in ifcfg-ppp0.
3. "ifup ppp0"   CLEARS the default route.

if DEFROUTE=yes, the default route gets set to the remote PPP ip, as expected.

The patch above fixed my problem.  It should be added in a future release.
Comment 2 Ngo Than 2005-08-15 02:41:36 EDT
it's now fixed in in rp-pppoe-3.5-30. Many thanks for your report.
Comment 3 David Herselman 2005-09-02 06:46:18 EDT
The patch above is a work around but it stops ADSL connections from being 
established all together on multi homed systems... The following changes are 
what was essentially fixed later in the rp-pppoe package:

--- adsl-connect        2005-09-02 12:40:07.000000000 +0200
+++ /sbin/adsl-connect  2005-09-02 12:37:49.000000000 +0200
@@ -227,18 +227,18 @@
 fi

 if test "$DEFROUTE" != "no" ; then
-    DEFROUTE="defaultroute"
+    DEFAULTROUTE="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=""
+    DEFAULTROUTE=""
 fi

 # Standard PPP options we always use
-PPP_STD_OPTIONS="$IPPARAM $LINKNAME $PLUGIN_OPTS noipdefault noauth default-
asyncmap $DEFROUTE hide-password nodetach $PEERDNS mtu 1492 mru 1492 noaccomp 
noccp nobsdcomp nodeflate nopcomp novj novjccomp user $USER lcp-echo-interval 
$LCP_INTERVAL lcp-echo-failure $LCP_FAILURE $PPPD_EXTRA"
+PPP_STD_OPTIONS="$IPPARAM $LINKNAME $PLUGIN_OPTS noipdefault noauth default-
asyncmap $DEFAULTROUTE hide-password nodetach $PEERDNS mtu 1492 mru 1492 
noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp user $USER lcp-echo-
interval $LCP_INTERVAL lcp-echo-failure $LCP_FAILURE $PPPD_EXTRA"

 # PPPoE invocation
 PPPOE_CMD="$PPPOE -p $PPPOE_PIDFILE -I $ETH -T $PPPOE_TIMEOUT -U $PPPOE_SYNC 
$CLAMPMSS $ACNAME $SERVICENAME $PPPOE_EXTRA"
Comment 4 Fedora Update System 2005-09-28 17:42:11 EDT
From User-Agent: XML-RPC

rp-pppoe-3.5-22.1 has been pushed for FC3, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.
Comment 5 Fedora Update System 2005-09-28 18:02:08 EDT
From User-Agent: XML-RPC

rp-pppoe-3.5-27.FC4.1 has been pushed for FC4, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.
Comment 6 Marc Olivier Chouinard 2006-02-22 09:44:25 EST
This problem is present in Redhat Enterprise 4.  Shouldn't it be fixed ? I'll
manually patched it but it is very anoying a software we payed $$$ on do not get
fixed with bugs like this.
Comment 7 Marc Olivier Chouinard 2006-02-22 09:48:24 EST
Ok forget it for the moment, I can't confirm it in RHEL4, Im having this problem
on a RHEL3 (Which we payed for too ;) That box wasn't updated to RHEL4 yet.
Comment 8 Ngo Than 2006-02-22 11:29:29 EST
There's already update request for this issue.
Comment 9 Mihirkumar Paulatsya 2013-01-21 12:49:01 EST
(In reply to comment #2)
> it's now fixed in in rp-pppoe-3.5-30. Many thanks for your report.

Hay Hi Ngo Than,

I face the same problem. Tried updating the script as described. But all fails.

Can you please share the updated script?



Thanks in Advance,
Mihirkumar Paulatsya

Note You need to log in before you can comment on or make changes to this bug.