Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 92023 - ip-up / ipup-post / ipup-routes does not add network routing for ppp devices
Summary: ip-up / ipup-post / ipup-routes does not add network routing for ppp devices
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
Blocks: FC5Target
TreeView+ depends on / blocked
Reported: 2003-05-31 18:27 UTC by Paul Moore
Modified: 2014-03-17 02:36 UTC (History)
3 users (show)

Fixed In Version: 8.32-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-04-10 22:54:58 UTC

Attachments (Terms of Use)

Description Paul Moore 2003-05-31 18:27:07 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030507

Description of problem:
According to the ppp man page ppp runs /etc/ppp/ip-up with the following parameters:

$1=interface-name $2=tty-device $3=speed $4=local-IP-address
$5=remote-ip-address $6=ipparam

/etc/ppp/ip-up runs /etc/sysconfig/network-scripts/ifup-post with the
following parameters:

$1=ifcfg-${LOGDEVICE} where ${LOGDEVICE} is ipparam from above.

Here we just lost the details of the real interface-name that we need to add a
static route through a dynamically allocated ppp interface.
It can, however, be recovered from the files in /var/run/ppp-{ipparam}.pid that
was created by the ifup-ppp script, although it would be far better to pass it
straight through.

/etc/sysconfig/network-scripts/ifup-post runs
/etc/sysconfig/network-scripts/ifup-routes ${DEVICE} ${NAME} where ${DEVICE} is
${LOGDEVICE} above and ${NAME} is NAME as defined in the configuration file

[ -f /var/run/ppp-$ ] && {
  LOCALDEVICE="dev `tail -1 /var/run/ppp-$`"
near the top of /etc/sysconfig/network-scripts/ifup-routes and
changing all occurrances of /sbin/ip route add $line to
/sbin/ip route add $line $LOCALDEVICE will work around the problem
as long as the ipparam parameter remains set by ifup-ppp and is not
overridden by an entry in /etc/ppp/peers/ppp?

This is a wastefull solution, though.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. echo > /etc/sysconfig/network-scripts/route-ppp4
2. ipup ppp4
3. interface comes up.

Actual Results:  1. Routing is not added.


Expected Results:  1. Routing should have been added through the newly brought
up ppp link.

Additional info:

1. It cannot work since ip route does not know where to route to.
2. I am using ppp-2.4.2-b1 and pptp-linux client, but that really shouldn't make
any difference since the behaviour of ppp in relation to the scripts is the same.

Comment 1 Pierre Ossman 2004-02-15 13:21:26 UTC
I can confirm this. Same problem on FC1.

I've built a VPN solution using ppp and initscripts. My solution to
the problem is:


--- initscripts-7.42.2.orig/sysconfig/network-scripts/ifup-post
2004-02-15 13:49:15.000000000 +0100
+++ initscripts-7.42.2/sysconfig/network-scripts/ifup-post     
2004-02-15 14:23:33.000000000 +0100
@@ -12,7 +12,13 @@
     /etc/sysconfig/network-scripts/ifup-aliases ${DEVICE} ${CONFIG}
-/etc/sysconfig/network-scripts/ifup-routes ${DEVICE} ${DEVNAME}
+# The real device may be sent as a second parameter
+[ -z $2 ] || [ "foo$2" = "fooboot" ] ||
+/etc/sysconfig/network-scripts/ifup-routes ${PHYSDEVICE} ${DEVNAME}
 if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" !=
"no" ]; then


Also, is using $NAME for finding route files deprecated? That was the
behaviour for RH9 but $DEVNAME is used in FC1.

Comment 2 Pierre Ossman 2004-02-15 13:32:40 UTC
Sorry. This is needed also:


--- initscripts-7.42.2.orig/ppp/ip-up   2004-02-15 13:49:15.000000000
+++ initscripts-7.42.2/ppp/ip-up        2004-02-15 14:36:03.000000000
@@ -8,7 +8,7 @@
-[ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] &&
/etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE}
+[ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] &&
/etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE} ${REALDEVICE}
 [ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local "$@"


Comment 3 Miloslav Trmač 2006-04-10 22:54:58 UTC
Fixed in initscripts-8.32-1.  Thanks for your report.

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