<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>205894</bug_id>
          
          <creation_ts>2008-01-14 21:29 0000</creation_ts>
          <short_desc>net.eth0 improperly adds default gateway</short_desc>
          <delta_ts>2008-01-16 13:08:13 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>baselayout</component>
          <version>unspecified</version>
          <rep_platform>AMD64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>gringo@slonko.net</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>holger.hoffstaette@googlemail.com</cc>
    
    <cc>proteuss@sdf.lonestar.org</cc>
    
    <cc>ranaldo@unina.it</cc>
    
    <cc>roy@marples.name</cc>
    
    <cc>tante@the-gay-bar.com</cc>

      

      
          <long_desc isprivate="0">
            <who>gringo@slonko.net</who>
            <bug_when>2008-01-14 21:29:03 0000</bug_when>
            <thetext>After upgrading to baselayout-1.12.11 I started having network problems - while local network was reachable for anything else I was getting &apos;Network unreachable&apos;.
After some investigation I found out that network startup script improperly sets default gateway:

sun ~ # netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     255.255.255.255 UGH       0 0          0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo

As you can see default gateway has &apos;H&apos; flags which means that route is for host (in opposite to network). Adding route manually:

route add default gw 192.168.1.1

solves the problem. In such case route shows up as:

0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0

My network configuration is the following:

config_eth0=( &quot;192.168.1.3/24&quot; )
routes_eth0=(
        &quot;default via 192.168.1.1&quot;
)

which is exactly what is specified in net.example file. AFter some debugging I figured out that route command for default gateway was invoked with -host option.

Reproducible: Always

Steps to Reproduce:
1. Upgrade baselayout 1.12.11
2. Startup network
3. Try to ping something outside your LAN

Actual Results:  
Network unreachable error

Expected Results:  
ICMP reply

Portage 2.1.4 (default-linux/amd64/2007.0/desktop, gcc-4.2.2, glibc-2.7-r1, 2.6.23-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.23-gentoo-r5 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
Timestamp of tree: Mon, 14 Jan 2008 19:47:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS=&quot;amd64 ~amd64&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-O2 -march=athlon64 -mtune=athlon64 -msse3 -ftracer -pipe&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d&quot;
CXXFLAGS=&quot;-O2 -march=athlon64 -mtune=athlon64 -msse3 -ftracer -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch&quot;
GENTOO_MIRRORS=&quot;ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo&quot;
LANG=&quot;en_US.UTF-8&quot;
LDFLAGS=&quot;-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-znow&quot;
LINGUAS=&quot;en pl&quot;
MAKEOPTS=&quot;-j3&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/paludis/local&quot;
SYNC=&quot;rsync://rsync.be.gentoo.org/gentoo-portage/&quot;
USE=&quot;3dnow 3dnowext X a52 aac aalib accessibility acpi adns alsa amd64 ao apm audiofile avahi bash-completion bcmath berkdb bidi bitmap-fonts bluetooth bzip2 cairo caps cddb cdparanoia cdr clamav cli cracklib crypt cscope ctype cups curl curlwrappers dbus dga directfb dri dts dv dvb dvd dvdr dvdread encode exif expat fbcon ffmpeg fftw firefox flac flatfile foomaticdb ftp gb gd gdbm ggi gif ginac glut gmp gnome gnutls gphoto2 gpm graphviz gstreamer gtk gtkhtml guile hal iconv idn imagemagick imlib isdnlog javascript jbig jikes jpeg jpeg2k kdehiddenvisibility lcms ldap lesstif libcaca libedit libgda libnotify libsamplerate libwww lm_sensors m17n-lib mad maildir matroska mbox mcal memlimit mhash midi mikmod mime mmap mmx mmxext mng mp3 mpeg mpi mplayer mudflap musepack ncurses nntp nocd nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp osc oss pam pcntl pcre pda pdf pic plotutils png portaudio posix ppds pppd qt3support quicktime rdesktop readline recode reflection sdl session sharedmem shorten simplexml skey slang slp sndfile snmp sockets sox speex spell sse sse2 ssl svg sysvipc szip tcpd test theora threads tidy tiff truetype truetype-fonts type1-fonts unicode usb v4l vcd videos vim-syntax vorbis wifi wmf wxwindows x264 xcomposite xine xinerama xml xmlrpc xorg xosd xpm xscreensaver xsl xv xvid yaz zlib&quot; ALSA_CARDS=&quot;ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci&quot; ALSA_PCM_PLUGINS=&quot;adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol&quot; APACHE2_MODULES=&quot;actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias&quot; CAMERAS=&quot;canon&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;keyboard mouse&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; LINGUAS=&quot;en pl&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;radeon v4l&quot;
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>proteuss@sdf.lonestar.org</who>
            <bug_when>2008-01-15 05:56:52 0000</bug_when>
            <thetext>Exactly the same problem here. I reverted to baselayout-1.12.10-r5 and solved the problem.

Portage 2.1.4 (!../usr/portage/profiles/default-linux/x86/2007.0, gcc-4.1.2, glibc-2.7-r1, 2.6.23-gentoo-r5-ufb-02 i686)
=================================================================
System uname: 2.6.23-gentoo-r5-ufb-02 i686 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz
Timestamp of tree: Tue, 15 Jan 2008 03:46:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.2-r1
dev-lang/python:     2.5.1-r5
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS=&quot;x86 ~x86&quot;
CBUILD=&quot;i686-pc-linux-gnu&quot;
CFLAGS=&quot;-march=prescott -O3 -pipe -fomit-frame-pointer&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/
CXXFLAGS=&quot;-march=prescott -O3 -pipe -fomit-frame-pointer&quot;
DISTDIR=&quot;/mnt/nfs_portage/distfiles&quot;
FEATURES=&quot;ccache distcc distlocks metadata-transfer parallel-fetch sandbox s
GENTOO_MIRRORS=&quot;ftp://ftp.ntua.gr/pub/linux/gentoo/ ftp://gentoo.arcticnetwo
LANG=&quot;el_GR.ISO-8859-7&quot;
LINGUAS=&quot;en el&quot;
MAKEOPTS=&quot;-j7&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compr                                                                                           xclude=/local --exclude=/packages --filter=H_**/files/digest-*&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/mnt/nfs_portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync.europe.gentoo.org/gentoo-portage&quot;
USE=&quot;X acl alsa arts bash-completion berkdb bitmap-fonts bzip2 cli cracklib                                                                                             hal iconv isdnlog java jpeg kde mad midi mmx mono mp3 mudflap mysql ncurses                                                                                           pppd python qt3 rdesktop readline reflection samba session slang spl sse ssl                                                                                            win32codecs x86 xine xorg xpm xprint xv xvid zlib&quot; ALSA_CARDS=&quot;hda-intel&quot; A                                                                                           s iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route                                                                                            nux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb n
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAG

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-01-15 10:04:56 0000</bug_when>
            <thetext>*** Bug 205932 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>roy@marples.name</who>
            <bug_when>2008-01-15 11:47:16 0000</bug_when>
            <thetext>Created an attachment (id=140975)
Fix default route

This patch is for /lib/rcscripts/net/ifconfig.sh
To apply do this
cd /lib/rcscripts/net
patch &lt;/path/to/patch</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kramer.martin@gmail.com</who>
            <bug_when>2008-01-15 15:44:27 0000</bug_when>
            <thetext>I can confirm that baselayout-1.12.11 works with the patch.
Thanks!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jaglover@gmail.com</who>
            <bug_when>2008-01-15 17:37:23 0000</bug_when>
            <thetext>(In reply to comment #3)
&gt; Created an attachment (id=140975) [edit]
&gt; Fix default route
&gt; 
&gt; This patch is for /lib/rcscripts/net/ifconfig.sh
&gt; To apply do this
&gt; cd /lib/rcscripts/net
&gt; patch &lt;/path/to/patch
&gt; 

Thanks for the patch, my routing table after boot looks sane again. :)
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gringo@slonko.net</who>
            <bug_when>2008-01-15 17:52:26 0000</bug_when>
            <thetext>Works here as well..

When can we expect this patch to appear in portage ?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-01-16 02:14:22 0000</bug_when>
            <thetext>please be patient and do not ask about &quot;when is it going to be in portage&quot;.  this really only serves to annoy people.  it&apos;ll get added whenever someone gets around to doing so, and asking does not make any difference.

baselayout-1.12.11.1 should work fine</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rainskellr@safe-mail.net</who>
            <bug_when>2008-01-16 13:02:24 0000</bug_when>
            <thetext>&gt; baselayout-1.12.11.1 should work fine

WFM

Thank you
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>140975</attachid>
            <date>2008-01-15 11:47 0000</date>
            <desc>Fix default route</desc>
            <filename>ifconfig.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGlmY29uZmlnLnNoCTIwMDgtMDEtMTUgMTE6Mzg6MzMuMDAwMDAwMDAwICswMDAwCisrKyBp
ZmNvbmZpZy5zaAkyMDA4LTAxLTE1IDExOjQzOjQzLjAwMDAwMDAwMCArMDAwMApAQCAtMzYyLDIx
ICszNjIsMTMgQEAKIAkJCVtbICR7eH0gIT0gKiItQSBpbmV0NiIqIF1dICYmIHg9Ii1BIGluZXQ2
ICR7eH0iCiAJCQl4PSIke3gvLyAtbmV0IC8gfSIKIAkJZWxzZQotCQkJIyBXb3JrIG91dCBpZiB3
ZSdyZSBhIGhvc3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