Bug 68968 - File static-routes does not work with dynamic ppp devices
Summary: File static-routes does not work with dynamic ppp devices
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: 67218 79579 CambridgeTarget
TreeView+ depends on / blocked
 
Reported: 2002-07-16 16:07 UTC by Jos Vos
Modified: 2014-03-17 02:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-29 20:06:36 UTC
Embargoed:


Attachments (Terms of Use)
Proposed patch (against initscripts 6.67) (1.61 KB, patch)
2002-07-27 19:31 UTC, Jos Vos
no flags Details | Diff
New patch for initscripts 6.90 (2.03 KB, patch)
2002-09-02 09:12 UTC, Jos Vos
no flags Details | Diff

Description Jos Vos 2002-07-16 16:07:31 UTC
It is currently not possible to properly define static routes for PPP devices,
because the only argument given to ifup-routes is the DEVICE variable from the
ifcfg-ppp file.  However, both that device name and the real (dynamically
assigned) device name should be passed as an argument to ifup-routes, as the
logical name should be used to select the corresponding entries in the
static-routes file and the real device name should be used as last argument to
the route add command.

Note that having multiple PPP connections and the need to assign static routes
sounds like a rare case, but in case of xDSL/cable PPP connections and VPN this
is not a strange situation (I came across this problem in a real-life
situation...).

Comment 1 Jos Vos 2002-07-27 19:31:36 UTC
Created attachment 67365 [details]
Proposed patch (against initscripts 6.67)

Comment 2 Jos Vos 2002-07-27 19:35:08 UTC
The patch (against initscripts 6.67) works for me. The drawback is that, if your
DEVNAME is "myname" for DEVICE "ppp8", for example, you have to create a symlink
"ifcfg-myname" to "ifcfg-ppp8", otherwise the relation to the actual device can
not be found. Although this patch works fine in my situation, I'm not sure if
this is the most easy and general solution.

Comment 3 Jos Vos 2002-09-02 09:12:52 UTC
Created attachment 74484 [details]
New patch for initscripts 6.90

Comment 4 Jos Vos 2002-09-02 09:40:02 UTC
I added a new patch for the new route file conventions.  In my proposal, the
route-ifname file can contain variables $DEVICE and $REALDEVICE, being expanded
(by eval) to the device (e.g., ppp10) and the actual device (e.g., ppp0).  For
non-PPP devices, $DEVICE and $REALDEVICE contain the same value.

Comment 5 Jos Vos 2003-01-14 09:47:27 UTC
I'm working on a new patch for this, as I found out that my solution was not
generic enough for other cases I had (some IPSEC stuff I'm working on).  I'm
testing that now on RH 7.3 and will then port it to RH 8.x.

The new solution is that ifup-routes will call a "ifdev-$DEVICETYPE" when it
exists to find out the $REALDEVICE for $DEVICE ($DEVICETYPE like in ifup). If no
corresponding script exists, it sets REALDEVICE=$DEVICE. So, you can make an
ifdev-ppp script that maps the logical ppp device to the actual ppp device, etc.
The idea is to be able the $REALDEVICE in the route-* files, as I now add a
route with the following command:

/sbin/ip route add `eval echo "$line"`

Comment 6 Bill Nottingham 2005-09-29 20:06:36 UTC
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

If this persists on a current release, such as Fedora Core 4, please open a new bug.


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