Bug 90858 - ifup breaks with missing default route
Summary: ifup breaks with missing default route
Keywords:
Status: CLOSED DUPLICATE of bug 79448
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-05-14 19:11 UTC by Pete Zaitcev
Modified: 2014-03-17 02:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 18:53:01 UTC
Embargoed:


Attachments (Terms of Use)

Description Pete Zaitcev 2003-05-14 19:11:17 UTC
Description of problem:

If the DHCP server did not supply a default route (a standalone network),
the following happens:

[root@niphredil /]# ifup eth0
                                                                                
Determining IP information for eth0... done.
/sbin/ifup: line 268: [: : integer expression expected
[root@niphredil /]#

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

[zaitcev@niphredil zaitcev]$ rpm -qf /sbin/ifup
initscripts-7.14-1
[zaitcev@niphredil zaitcev]$ rpm -q initscripts
initscripts-7.14-1
[zaitcev@niphredil zaitcev]$

How reproducible:

100%, but you have to have some unusual DHCP server configuration.

Additional info:

On some NAT boxes this happens if the Internet connection breaks,
perhaps that'll help reproducing.

Typically users notice this when GNOME refuses to start up and
posts a dialog "Cannot resolve host foo, login anyway?".

Comment 1 Pete Zaitcev 2003-05-14 19:15:23 UTC
Just so you don't have to unearth an old ifup, here's the line:

    # DHCP likes to create duplicate routes.  Fix that up.
    NUMDEFROUTES=`ip -o route | \
                  grep "^default" | \
                  awk '{ nlines++ } END { print nlines }'`
    if [ -n "$NUMDEFROUTES" -a "$NUMDEFROUTES" -gt 1 ]; then     <<==== 268
        # remove the default route for the new device (old route wins)
        ip route del default dev ${DEVICE}
    fi


Comment 2 Aleksey Nogin 2003-06-11 22:34:54 UTC

*** This bug has been marked as a duplicate of 79448 ***

Comment 3 Red Hat Bugzilla 2006-02-21 18:53:01 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


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