Bug 152014 - adsl-connect ignores DEFROUTE=no
Summary: adsl-connect ignores DEFROUTE=no
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rp-pppoe
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-03-24 12:56 UTC by Eric Yeo
Modified: 2013-01-21 17:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-08-15 06:41:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Eric Yeo 2005-03-24 12:56:23 UTC
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 04:36:30 UTC
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 Than Ngo 2005-08-15 06:41:36 UTC
it's now fixed in in rp-pppoe-3.5-30. Many thanks for your report.

Comment 3 David Herselman 2005-09-02 10:46:18 UTC
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 21:42:11 UTC
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 22:02:08 UTC
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 14:44:25 UTC
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 14:48:24 UTC
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 Than Ngo 2006-02-22 16:29:29 UTC
There's already update request for this issue.

Comment 9 Mihirkumar Paulatsya 2013-01-21 17:49:01 UTC
(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.