Bug 19677
Summary: | If no GATEWAYDEV, all interfaces try to set default route | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Pekka Savola <pekkas> |
Component: | initscripts | Assignee: | Bill Nottingham <notting> |
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dr, rvokal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-01-30 22:20:16 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Pekka Savola
2000-10-24 12:17:15 UTC
Does this still happen with the beta? Yes. This can be seen with 'service network restart', which gives like: Jan 30 16:26:07 install5 network: Shutting down interface eth1: succeeded Jan 30 16:26:08 install5 modprobe: modprobe: Can't locate module irlan0 Jan 30 16:26:08 install5 syslogd: sendto: Network is unreachable Jan 30 16:26:08 install5 syslogd: sendto: Network is unreachable Jan 30 16:26:08 install5 sysctl: net.ipv4.ip_forward = 0 Jan 30 16:26:08 install5 sysctl: net.ipv4.conf.all.rp_filter = 1 Jan 30 16:26:08 install5 sysctl: kernel.sysrq = 0 Jan 30 16:26:08 install5 network: Setting network parameters: succeeded Jan 30 16:26:08 install5 ifup: SIOCADDRT: Network is unreachable Jan 30 16:26:08 install5 network: Bringing up interface lo: succeeded Jan 30 16:26:09 install5 network: Bringing up interface eth1: succeeded Note ifup line, as before. Hmm... we could always ping the gateway, to see if it's reachable at that address. But that's a hack. We could certainly special-case lo to not try and add it; that would eliminate some of the messages. OK, here's the fix that's going into initscripts-5.60-1; it seems correct. Change the test from: if [ "${GATEWAY}" != "" ]; then to if [ "${GATEWAY}" != "" -a "`ipcalc --network ${GATEWAY} ${NETMASK}`" = "`ipcalc --network ${IPADDR} ${NETMASK}`" ]; then (of course, replace the second ipcalc call with just ${NETWORK} *thwap*) This doesn't exactly work, but the idea is sound. ipcalc --network ${GATEWAY} ${NETMASK} returns something like NETWORK=1.2.3.4 not 1.2.3.4 ;-) There are ways to get around this, but it might be useful to add a feature in ipcalc that'd omit NETWORK=, NETMASK= etc. too. I did this with: if [ "${GATEWAY}" != "" -a "`ipcalc --network ${GATEWAY} ${NETMASK}`" = "NETWORK=${NETWORK}" ]; then and the original bug disappeared. A bit hackish. Oops, yeah. Disregard the parenthetical comment entirely. :) It's hackish, but it seems the quickest way to determine if you're adding the gateway on a reasonably appropriate interface. |