Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143916 - net-dialup/ppp-2.4.3-r16 + sys-apps/baselayout-1.12.4-r4 = infinite net.ppp0 restart
Summary: net-dialup/ppp-2.4.3-r16 + sys-apps/baselayout-1.12.4-r4 = infinite net.ppp0 ...
Status: RESOLVED DUPLICATE of bug 143914
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-14 12:15 UTC by Sergey Belyashov
Modified: 2006-08-14 12:15 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 Sergey Belyashov 2006-08-14 12:15:01 UTC
Tomorrow I update baselayout and ppp packages (I remove previous /etc/init.d/net.ppp0 and /etc/conf.d/net.ppp0 files).
I make link to net.lo with name 'net.ppp0'.
I add to /etc/conf.d/net next lines:
config_ppp0=( "ppp" )
link_ppp0="pty 'pptp --sync ppp.some-isp.ru --nolaunchpppd --loglevel 0'"
username_ppp0='bsa'
depend_ppp0() {
    need net.eth0
}
pppd_ppp0=(
    lock
    sync
    require-mschap
    noauth
    nopcomp
    noaccomp
    nobsdcomp
    nodeflate
    defaultroute
)
And I start net.ppp0. All starts and works fine. But I need some extra features: when real link is up it's need to add some routes, change some configs and reload some services (bind and postfix, for example). It is need for two separate internet channels. To check them I add to /etc/conf.d/net next functions:
postup() {
    logger -t $1 Interface $1 up
}

postdown() {
    logger -t $1 Interface $1 down
}
Restart net.ppp0. And run 'killall pptp'...
Next I run tail -f /var/log/messages:
Aug 14 22:03:56 bsa pptp[19941]: anon log[ctrlp_disp:pptp_ctrl.c:738]: Received Start Control Connection Reply
Aug 14 22:03:56 bsa pptp[19941]: anon log[ctrlp_disp:pptp_ctrl.c:772]: Client connection established.
Aug 14 22:03:57 bsa pptp[19941]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Aug 14 22:03:57 bsa pptp[19941]: anon log[ctrlp_disp:pptp_ctrl.c:857]: Received Outgoing Call Reply.
Aug 14 22:03:57 bsa pptp[19941]: anon log[ctrlp_disp:pptp_ctrl.c:896]: Outgoing call established (call ID 0, peer's call ID 0).
Aug 14 22:03:57 bsa pppd[19921]: CHAP authentication succeeded: <some code>
Aug 14 22:03:57 bsa pppd[19921]: CHAP authentication succeeded
Aug 14 22:03:57 bsa pppd[19921]: local  IP address yyy.yyy.yyy.yyy
Aug 14 22:03:57 bsa pppd[19921]: remote IP address xxx.xxx.xxx.xxx
Aug 14 22:03:58 bsa ppp0: Interface ppp0 up
Aug 14 22:04:40 bsa sudo:   bsa : TTY=pts/3 ; PWD=/home/bsa ; USER=root ; COMMAND=/bin/killall pptp
Aug 14 22:04:40 bsa pppd[19921]: Modem hangup
Aug 14 22:04:40 bsa pppd[19921]: Connect time 0.8 minutes.
Aug 14 22:04:40 bsa pppd[19921]: Sent 1028 bytes, received 2145 bytes.
Aug 14 22:04:40 bsa pptp[19941]: anon log[callmgr_main:pptp_callmgr.c:231]: Closing connection (unhandled)
Aug 14 22:04:40 bsa pptp[19941]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Aug 14 22:04:40 bsa pptp[19941]: anon log[call_callback:pptp_callmgr.c:78]: Closing connection (call state)
Aug 14 22:04:40 bsa pppd[19921]: Connection terminated.
Aug 14 22:04:41 bsa ppp0: Interface ppp0 down
Aug 14 22:04:41 bsa pppd[19921]: Using interface ppp0
Aug 14 22:04:41 bsa pppd[19921]: Connect: ppp0 <--> /dev/pts/4
Aug 14 22:04:41 bsa pptp[20817]: anon log[main:pptp.c:267]: The synchronous pptp option is activated
Aug 14 22:04:41 bsa pptp[20830]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Aug 14 22:04:41 bsa pptp[20830]: anon log[ctrlp_disp:pptp_ctrl.c:738]: Received Start Control Connection Reply
Aug 14 22:04:41 bsa pptp[20830]: anon log[ctrlp_disp:pptp_ctrl.c:772]: Client connection established.
Aug 14 22:04:42 bsa pptp[20830]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Aug 14 22:04:42 bsa pptp[20830]: anon log[ctrlp_disp:pptp_ctrl.c:857]: Received Outgoing Call Reply.
Aug 14 22:04:42 bsa pptp[20830]: anon log[ctrlp_disp:pptp_ctrl.c:896]: Outgoing call established (call ID 0, peer's call ID 128).
Aug 14 22:04:42 bsa pppd[19921]: CHAP authentication succeeded: <some code>
Aug 14 22:04:42 bsa pppd[19921]: CHAP authentication succeeded
Aug 14 22:04:42 bsa pppd[19921]: local  IP address yyy.yyy.yyy.yyy
Aug 14 22:04:42 bsa pppd[19921]: remote IP address xxx.xxx.xxx.xxx
Aug 14 22:04:43 bsa ppp0: Interface ppp0 up
Aug 14 22:04:45 bsa pptp[20830]: anon log[callmgr_main:pptp_callmgr.c:231]: Closing connection (unhandled)
Aug 14 22:04:45 bsa pptp[20830]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Aug 14 22:04:45 bsa pptp[20830]: anon log[call_callback:pptp_callmgr.c:78]: Closing connection (call state)
Aug 14 22:04:45 bsa pppd[19921]: Modem hangup
Aug 14 22:04:45 bsa pppd[19921]: Connect time 0.1 minutes.

.... etc (cycled).

Then I check /etc/ppp/ip-up script and found next lines:
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 start
        fi
fi

This can be read as: if /etc/init.d/net.ppp0 present and /etc/init.d/net.ppp0 not started then start it.
But. As I know ip-up executed every time link up, but not pppd starts (for example, when isp cause link abort to change dynamic IP, and pppd automatically reconnects).
In ip-down present same lines which stops script when it started.

In this case:
I kill pptp. pptp finishes and pppd execute ip-down and pptp again to restore link...
at this time ip-down calls 'net.ppp0 stop' and pppd calls ip-up because link were up...
ip-up calls 'net.ppp0 start' and pppd calls ip-down before terminating...
etc...
Comment 1 Sergey Belyashov 2006-08-14 12:15:59 UTC

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