Bug 146177 - ifup-routes fails with virtual interfaces
Summary: ifup-routes fails with virtual interfaces
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
(Show other bugs)
Version: 3
Hardware: All Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2005-01-25 19:26 UTC by Tyler Larson
Modified: 2014-03-17 02:52 UTC (History)
1 user (show)

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

Attachments (Terms of Use)

Description Tyler Larson 2005-01-25 19:26:45 UTC
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 19:28:37 UTC
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 20:38:31 UTC
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.