Bug 68968 - File static-routes does not work with dynamic ppp devices
File static-routes does not work with dynamic ppp devices
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks: 67218 79579 CambridgeTarget
  Show dependency treegraph
 
Reported: 2002-07-16 12:07 EDT by Jos Vos
Modified: 2014-03-16 22:29 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-29 16:06: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)
Proposed patch (against initscripts 6.67) (1.61 KB, patch)
2002-07-27 15:31 EDT, Jos Vos
no flags Details | Diff
New patch for initscripts 6.90 (2.03 KB, patch)
2002-09-02 05:12 EDT, Jos Vos
no flags Details | Diff

  None (edit)
Description Jos Vos 2002-07-16 12:07:31 EDT
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 15:31:36 EDT
Created attachment 67365 [details]
Proposed patch (against initscripts 6.67)
Comment 2 Jos Vos 2002-07-27 15:35:08 EDT
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 05:12:52 EDT
Created attachment 74484 [details]
New patch for initscripts 6.90
Comment 4 Jos Vos 2002-09-02 05:40:02 EDT
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 04:47:27 EST
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 16:06:36 EDT
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.