Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 146177 - ifup-routes fails with virtual interfaces
ifup-routes fails with virtual interfaces
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2005-01-25 14:26 EST by Tyler Larson
Modified: 2014-03-16 22:52 EDT (History)
1 user (show)

See Also:
Fixed In Version: 8.16-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-03 16:38:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tyler Larson 2005-01-25 14:26:45 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:
ifup-routes fails when called with a virtual interface (like eth0:1 or
eth0:2) as the first argument. The problem is that it passes the
interface name to "/sbin/ip route", which doesn't accept virtual
interfaces as the output device.

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

How reproducible:

Steps to Reproduce:
1. create a route on a virtual interface (such as eth0:1 or eth1:1)
2. execute ifup <interface>
   execute ifup-routes <interface>

Actual Results:  /sbin/ip returns error and prints 'Cannot find device

Expected Results:  Route should be added using the base device name
(e.g. "eth0" instead of "eth0:1", or "eth1" instead of "eth1:1")

Additional info:
Comment 1 Tyler Larson 2005-01-25 14:28:37 EST
Here's a patch that will fix the problem:

--- ifup-routes.orig	2005-01-25 11:52:46.155609389 -0700
+++ ifup-routes	2005-01-25 11:55:45.443678453 -0700
@@ -30,7 +30,7 @@
    if [ -f "$file" ]; then
        if egrep -q 'ADDRESS[0-9]+=' $file ; then
            # new format
-	   handle_file $file $1
+	   handle_file $file ${1%:*}
            # older format
            while read line; do
Comment 2 Bill Nottingham 2005-10-03 16:38:31 EDT
I just tested this on rawhide, and it appears to work OK. Closing.

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