From owner-freebsd-ports@FreeBSD.ORG Wed Oct 6 20:24:19 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5593F16A4CE; Wed, 6 Oct 2004 20:24:19 +0000 (GMT) Received: from brain.cc.rsu.ru (brain.cc.rsu.ru [195.208.252.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7116B43D2D; Wed, 6 Oct 2004 20:24:18 +0000 (GMT) (envelope-from os@brain.cc.rsu.ru) Received: from brain.cc.rsu.ru (localhost [127.0.0.1]) by brain.cc.rsu.ru (8.13.1/8.12.9) with ESMTP id i96KOGbp047358; Thu, 7 Oct 2004 00:24:16 +0400 (MSD) (envelope-from os@brain.cc.rsu.ru) Received: (from os@localhost) by brain.cc.rsu.ru (8.13.1/8.12.9/Submit) id i96KOF8u047357; Thu, 7 Oct 2004 00:24:15 +0400 (MSD) (envelope-from os) Date: Thu, 7 Oct 2004 00:24:15 +0400 (MSD) Message-Id: <200410062024.i96KOF8u047357@brain.cc.rsu.ru> To: FreeBSD-gnats-submit@freebsd.org From: Oleg Sharoiko X-send-pr-version: 3.113 X-GNATS-Notify: cc: ports@freebsd.org cc: and@rsu.ru cc: archie@freebsd.org Subject: PPPoE issues with net/mpd X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Oleg Sharoiko List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2004 20:24:19 -0000 >Submitter-Id: current-users >Originator: Oleg Sharoiko >Organization: Computer Center of Rostov State university >Confidential: no >Synopsis: PPPoE issues with net/mpd >Severity: serious >Priority: medium >Category: ports >Class: sw-bug >Release: FreeBSD 5.3-BETA6 i386 >Environment: System: FreeBSD wolf.os.rsu.ru 5.3-BETA6 FreeBSD 5.3-BETA6 #1: Sat Oct 2 19:44:22 MSD 2004 os@wolf.os.rsu.ru:/usr/obj/usr/src/sys/wolf.os.i686.RELENG_5.2004-09-30 i386 >Description: mpd fails to establish pppoe connection. mpd.conf ---------- pppoe-aaanet-orig: new -i ng0 pppoe-aaanet-orig pppoe-fxp0-orig set bundle authname "authname" set bundle password "password" set bundle enable compression set link keep-alive 15 30 set link disable pap chap set link accept pap chap set link enable acfcomp protocomp set link enable no-orig-auth set ccp enable mppc mpp-compress mpp-e40 mpp-e56 mpp-e128 set ecp enable des set ipcp enable vjcomp set ipcp no req-pri-dns req-sec-dns req-pri-nbns req-sec-nbns set iface route default open iface -------- mpd.links -------- pppoe-fxp0-orig: set link type pppoe set pppoe iface fxp0 set pppoe disable incoming set pppoe enable originate -------- log -------- Oct 6 22:26:36 wolf mpd: mpd: pid 507, version 3.18 (root@wolf.os.rsu.ru 20:32 5-Oct-2004) Oct 6 22:26:36 wolf mpd: [pppoe-aaanet-orig] ppp node is "mpd507-pppoe-aaanet-orig" Oct 6 22:26:36 wolf mpd: [pppoe-aaanet-orig] using interface ng0 Oct 6 22:26:36 wolf mpd: [pppoe-aaanet-orig] IFACE: Open event Oct 6 22:26:36 wolf mpd: [pppoe-aaanet-orig] IPCP: Open event Oct 6 22:26:36 wolf mpd: [pppoe-aaanet-orig] IPCP: state change Initial --> Starting Oct 6 22:26:36 wolf mpd: [pppoe-aaanet-orig] IPCP: LayerStart Oct 6 22:26:36 wolf mpd: [pppoe-aaanet-orig] bundle: OPEN event in state CLOSED Oct 6 22:26:36 wolf mpd: [pppoe-aaanet-orig] opening link "pppoe-fxp0-orig"... Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] link: OPEN event Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] LCP: Open event Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] LCP: state change Initial --> Starting Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] LCP: LayerStart Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] device: OPEN event in state DOWN Oct 6 22:26:36 wolf mpd: [pppoe-aaanet-orig] can't connect bypass,link0 and fxp0:orphans,mpd507-pppoe-fxp0-orig: No such file or directory Oct 6 22:26:36 wolf mpd: [pppoe-aaanet-orig] can't remove hook mpd507-pppoe-fxp0-orig from node "fxp0:orphans": No such file or directory Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] device is now in state OPENING Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] device: DOWN event in state OPENING Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] device is now in state DOWN Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] link: DOWN event Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] LCP: Down event Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] device: OPEN event in state DOWN Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] pausing 6 seconds before open Oct 6 22:26:36 wolf mpd: [pppoe-fxp0-orig] device is now in state DOWN -------- This looks very similar to ports/62477. If mpd started after ppp with pppoe setup then mpd works fine. Executing /sbin/ifconfig fxp0 up /usr/sbin/ngctl mkpeer fxp0: pppoe orphans ethernet before mpd also make mpd happy. It looks like 1) mpd doesn't put interface into UP state and 2) mpd fails to create netgraph hook >How-To-Repeat: Reboot a system Run mpd with pppoe setup >Fix: Workaround: Execute /sbin/ifconfig fxp0 up /usr/sbin/ngctl mkpeer fxp0: pppoe orphans ethernet before running mpd. The following startup script will help starting mpd in such a situations: --------- #!/bin/sh # PROVIDE: mpd # REQUIRE: netif isdnd # KEYWORD: FreeBSD nojail shutdown . /etc/rc.subr name="mpd" rcvar=`set_rcvar` mpd_start_precmd() { /sbin/ifconfig fxp0 up /usr/sbin/ngctl mkpeer fxp0: pppoe orphans ethernet || true } mpd_stop_postcmd() { /usr/sbin/ngctl rmhook fxp0: orphans } load_rc_config $name start_precmd="mpd_start_precmd" stop_postcmd="mpd_stop_postcmd" command=${mpd_program:-"/usr/local/sbin/mpd"} pidfile=${mpd_pidfile:-"/var/run/mpd.pid"} flags=${mpd_flags:-"-b -p ${pidfile} ${mpd_profile}"} run_rc_command "$1" --------- It would be nice to switch mpd to rcNG startup script. This one can be used after this issues have been resolved and workarounds (mpd_start_precmd/mpd_stop_precmd) removed.