Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89017 - Fix for net.pppX with multiple NICs
Summary: Fix for net.pppX with multiple NICs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-13 14:45 UTC by Elliot Mackenzie
Modified: 2005-04-16 03:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elliot Mackenzie 2005-04-13 14:45:40 UTC
Currently (if the relevant parameter in conf.d/net.pppx is set) net.pppx is relying on an egrep for 0.0.0.0 in "route -n" to determine if it needs to flush a default route before setting up ppp.  

Because the current grep rule will accept 0.0.0.0 anywhere in the line I am noticing that this trigger causes route del default to run when there is no default gateway - specifically anytime I have one or more independent interfaces with no gateway set.  

The result is if I have any interface with no gateway and I try to start net.pppx I will always get "SIOCDELRT: No such process", regardless of whether or not the system actually has a default route to clear.

This does not prevent the ppp connection from establishing and setting the default route properly, it just whinges unnecessarily.

Specifically in the start () section:

if [ -n "$(/sbin/route -n | egrep '0.0.0.0')" ] && route del default

Might I suggest adjusting the egrep expression to '^0.0.0.0' (note the carat)?

Reproducible: Always
Steps to Reproduce:
1.Add extra interface with no default gateway (such that 0.0.0.0 appears in "route -n" for the gateway for that interface
2.Start pppX interface with defaultroute setting switched on
3.Remove any existing system default routes
3.You should see an error when route del default attempts to run.

Actual Results:  
route del default
/etc/init.d/net.ppp0 start
SIOCDELRT: No such process
(ppp started OK)

Expected Results:  
route del default in /etc/init.d/net.ppp0 should not have run when no default
route actually exists.  Therefore, SIOCDELRT: no such process should not have
happened.
Comment 1 SpanKY gentoo-dev 2005-04-14 21:59:30 UTC
you neglected to provide `emerge info` like the bug report page told you to

also, baselayout doesnt provide net.pppx, so where is that file coming from on your system ?
you can try:
find /var/db/pkg -name CONTENTS | xargs grep net.ppp
Comment 2 Elliot Mackenzie 2005-04-15 03:43:25 UTC
This file is in net-dialup/ppp (my bad - I thought it was in baselayout but didn't think to check):
/var/db/pkg/net-dialup/ppp-2.4.2-r10/CONTENTS:obj /etc/init.d/net.ppp0 418d4cddca90ee19a6ab0a2fd07afd94 1110192690
/var/db/pkg/net-dialup/ppp-2.4.2-r10/CONTENTS:obj /etc/conf.d/net.ppp0 c9117abf5fed623d5290779446e9855e 1110192690

The file I am referring to is /etc/init.d/net.ppp0

Emerge info:
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.4.25-gentoo-r3 i686)
=================================================================
System uname: 2.4.25-gentoo-r3 i686 Celeron (Coppermine)
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar  7 2005, 19:55:15)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/mail/dspam /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://mirror.uni-c.dk/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 alsa apache apm arts avi berkdb bitmap-fonts crypt cups curl emboss encode foomaticdb fortran gdbm gif gpm gtk2 imagemagick imap imlib innodb ipv6 jpeg libg++ libwww mad mbox mikmod milter motif mp3 mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png postgres ppds python quicktime readline samba sdl slang spell ssl svga tcpd tiff truetype truetype-fonts type1-fonts xml2 xmms xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 3 SpanKY gentoo-dev 2005-04-15 11:11:09 UTC
yeah, base doesnt support that file :)
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2005-04-16 03:13:49 UTC
Fixed without issuing new revisions. Don't wanna stress the others with unecessary updates if they are happy with the old script.