Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150519 - >=ppp-2.4.3-r12 - pppd gets disconnected by ip-down even if persist and maxfail 0 is set
Summary: >=ppp-2.4.3-r12 - pppd gets disconnected by ip-down even if persist and maxfa...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-08 15:07 UTC by cilly
Modified: 2006-10-09 22:20 UTC (History)
1 user (show)

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 cilly 2006-10-08 15:07:47 UTC
pppd gets disconnected by ip-down even if persist and maxfail 0 is set
----------------------------------------------------------------------

The /etc/ppp/ip-down script contains:


if [ -x /etc/init.d/net.$1 ]; then
        if /etc/init.d/net.$1 --quiet status ; then
                export IN_BACKGROUND="true"
                /etc/init.d/net.$1 --quiet stop
        fi
fi

which terminates the pppd deamon even if the user configures the pppd daemon with maxfail 0 and persist. This behaviour is against the user's intention to let pppd run forever.


Another side-effect of restarting pppd:

After the pppd has been stopped it takes 5 seconds until pppd starts again.

Instead, it would be nicer not to trigger a pppd stop on ip-down if maxfail 0 and persist is set.

Btw, after ip-down stopped pppd, how is pppd restarted again?
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-10-08 23:30:35 UTC
Reopen with baselayout version, relevant /etc/ppp config files and your /etc/conf.d/net, please.
Comment 2 cilly 2006-10-09 01:23:43 UTC
emerge --info

Portage 2.1.1 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.18 i686)
=================================================================
System uname: 2.6.18 i686 VIA Samuel 2
Gentoo Base System version 1.12.5
Last Sync: Sun, 08 Oct 2006 23:59:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-march=i586 -Os -m3dnow -mmmx -pipe -fomit-frame-pointer"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=i586 -Os -m3dnow -mmmx -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow acl apache2 bash-completion berkdb bitmap-fonts bzip2 caps cli crypt cups curl dlloader dri elibc_glibc fortran gd gdbm gmp idn imap innodb input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog jpeg kernel_linux libg++ libwww linguas_en lm_sensors maildir mhash mmx mysql ncurses nls nptl nptlonly pam pam-mysql pcre perl png posix ppds pppd python readline reflection sasl session snmp spl ssl tcpd threads tiff truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo xml zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS

# end emerge --info

sys-apps/baselayout-1.12.5-r2

/etc/conf.d/net does not exist

cat /etc/conf.d/net.eth0
###
# eth0 - LAN
###

config_eth0=( "172.16.17.1 netmask 255.255.255.0 broadcast 172.16.17.255" )

cat /etc/conf.d/net.eth1
###
# eth1 - Null
###

config_eth1=( "null" )
ifplugd_eth1="--delay-down=1"

cat /etc/conf.d/net.ppp0 
###
# ppp0 = PPPoE (ADSL)
###

config_ppp0=( "ppp" )
link_ppp0="eth1"
plugins_ppp0=( "pppoe" )
ifplugd_ppp0="--delay-down=1"

# PPP requires at least a username. You can optionally set a password here too
# If you don't, then it will use the password specified in /etc/ppp/*-secrets
# against the specified username
username_ppp0='username'
#password_ppp0='password'

pppd_ppp0=(

    "hide-password"         # Exclude the password string from the log
    "persist"               # Do not exit after a connection is terminated
    "maxfail 0"             # if you don't specify maxfail then we assume 0
#   "debug"                 # Enables syslog debugging
    "ktune"                 # Enables pppd to alter kernel settings as appropriate
    "noauth"                # Do not require the peer to authenticate itself

    "noipdefault"           # Get IP from peer
    "defaultroute"          # Make this PPP interface the default route

    "ipcp-accept-remote"    # Accept the peers idea of remote address
    "ipcp-accept-local"     # Accept the peers idea of local address

    "lcp-echo-interval 15"  # Send a LCP echo every 15 seconds
    "lcp-echo-failure 4"    # Make peer dead after 4 consective echo-requests
    "holdoff 0"             # Wait n seconds after link dies before re-starting

    "noaccomp"              # Disable Address/Control compression
    "nopcomp"               # Disable protocol field compression negotiation
    "novj"                  # Disable Van Jacobson style TCP/IP header compression
    "novjccomp"             # Disable the connection-ID compression in ^^^
    "nobsdcomp"             # Disable BSD-Compress compression
    "nodeflate"             # Disable Deflate compression
    "noccp"                 # Disable CCP (Compression Control Protocol) negotiation.

)
Comment 3 cilly 2006-10-09 01:26:17 UTC
forgot to reopen :/
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2006-10-09 02:02:18 UTC
> Instead, it would be nicer not to trigger a pppd stop on ip-down if maxfail 0
> and persist is set.
> Btw, after ip-down stopped pppd, how is pppd restarted again?

persist is implicit even if user doesn't set it.
net.ppp0 stop doesn't kill pppd if $IN_BACKGROUND is true, it only sets net.ppp0 in inactive state (for informational purposes).

Do you really had a killed pppd or is just something you imagined?
Comment 5 cilly 2006-10-09 05:23:29 UTC
I am checking it again, waiting for an IP-Change initialized from the provider.
Comment 6 Alin Năstac (RETIRED) gentoo-dev 2006-10-09 05:49:06 UTC
I don't know what ifplugd_ppp0="--delay-down=1" should exactly do.
Also, I don't think it is wise to set ifplugd on eth1 (I bet pppd will exit() if the link interface is shutted down).
Comment 7 cilly 2006-10-09 08:06:55 UTC
(In reply to comment #6)
> I don't know what ifplugd_ppp0="--delay-down=1" should exactly do.
> Also, I don't think it is wise to set ifplugd on eth1 (I bet pppd will exit()
> if the link interface is shutted down).

Accodring to the manpage of ifplugd the option --delay-down=1 is the delay in seconds for deconfiguring the interface.

As in net.example explained, ifplugd listens by default on all interfaces, but not on ppp0. I see only two processes of ifplugd listed in output of ps (eth0 and eth1) but not for ppp0. So there is no ifplugd running for ppp0 and the option ifplugd_ppp0 won't have any effect. ifplugd will only bring eth1 and ppp0 down if the link is down, i.e. the cable is pulled. On replug ifplugd will start eth1 again and also ppp0 connects again. Strange since even if eth1 has been stopped by ifplugd the pppd did not quit and was waiting for PADO packets, once connected again the same pppd (same pid) reconnected again.
Comment 8 cilly 2006-10-09 19:34:26 UTC
Okay, now pppd did not change its pid. pppd did not exit. I probably misread the log, sorry for that guys.
Comment 9 Alin Năstac (RETIRED) gentoo-dev 2006-10-09 22:20:06 UTC
the correct resolution is INVALID
Comment 10 Alin Năstac (RETIRED) gentoo-dev 2006-10-09 22:20:47 UTC
marked as INVALID