From martti@sl.sgn.ellemtel.net  Thu Apr 16 03:53:08 1998
Received: from sl.sgn.ellemtel.net (sl.sgn.ellemtel.net [193.10.15.158])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA06253
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 16 Apr 1998 03:53:07 -0700 (PDT)
          (envelope-from martti@sl.sgn.ellemtel.net)
Received: from sigurd.sgn.ellemtel.net (sigurd.sgn.ellemtel.net [193.10.15.148])
	by sl.sgn.ellemtel.net (8.8.8/8.8.7) with ESMTP id MAA05736
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 16 Apr 1998 12:51:07 +0200 (CEST)
	(envelope-from martti.kuparinen)
Received: (from martti@localhost)
	by sigurd.sgn.ellemtel.net (8.8.8/8.8.7) id MAA01107;
	Thu, 16 Apr 1998 12:51:07 +0200 (CEST)
Message-Id: <199804161051.MAA01107@sigurd.sgn.ellemtel.net>
Date: Thu, 16 Apr 1998 12:51:07 +0200 (CEST)
From: martti.kuparinen@sl.sgn.ellemtel.net
Reply-To: martti.kuparinen@sl.sgn.ellemtel.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: pppd does not update wtmp on hangup
X-Send-Pr-Version: 3.2

>Number:         6318
>Category:       kern
>Synopsis:       pppd does not update wtmp on hangup
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 16 04:00:02 PDT 1998
>Closed-Date:    Thu Oct 11 07:51:59 PDT 2001
>Last-Modified:  Thu Oct 11 07:52:56 PDT 2001
>Originator:     Martti Kuparinen
>Release:        FreeBSD 2.2.6-STABLE i386
>Organization:
Stockholm Gigabit Network
>Environment:

Pentium 166, FreeBSD 2.2.6-STABLE (cvsupped and compiled 980414) and
two 56k modems. The server accepts PPP-only connections (without any
login scripts in the client side, i.e. no getty is involved).

The server is running kernel PPP, i.e. pppd, and the version is
2.2.0 according to the log files.

>Description:

When the user logs out, i.e. disconnects the modem, wtmp is not
updated although the pppd in terminated without any errors (see
the output from ``last''):

    reboot   ~                         Tor 16 Apr 08:37 
    shutdown ~                         Tor 16 Apr 08:37 
    martti   ttyd1    :PPP             Tor 16 Apr 08:33 - shutdown  (00:03)
    martti   ttyd1    :PPP             Tor 16 Apr 08:32 - shutdown  (00:05)

The logs in /var/log/messages show that the first connection (started
at 8:32) lasted only 16 secs, so the logout time should be 08:32.

    Apr 16 08:32:01 sigurd pppd[3484]: Connect: ppp0 <--> /dev/ttyd1
    Apr 16 08:32:02 sigurd pppd[3484]: local  IP address 10.0.0.1
    Apr 16 08:32:02 sigurd pppd[3484]: remote IP address 10.0.0.101
    Apr 16 08:32:17 sigurd pppd[3484]: Modem hangup
    Apr 16 08:32:17 sigurd pppd[3487]: pppd 2.2.0 started by root, uid 0
    Apr 16 08:33:54 sigurd pppd[3487]: Connect: ppp0 <--> /dev/ttyd1

>How-To-Repeat:

I have in /etc/ttys the following lines:

    ttyd0   "/usr/sbin/pppd -detach 115200" unknown on  insecure
    ttyd1   "/usr/sbin/pppd -detach 115200" unknown on  insecure

All pppd daemons share these settings (/etc/ppp/options):

    crtscts                         # Hardware flow control
    modem                           # modem line
    passive                         # wait for LCP
    +pap                            # Use PAP
    login                           # Use /etc/passwd in PAP
    auth                            # req. authentication
    netmask 255.255.255.0           # our netmask
    domain ppp.net                  # our domain name
    dns1 10.0.0.1                   # our primary DNS server
    dns2 xxx.xxx.xxx.xxx            # our secondary DNS server

pppd connected to ttyd0 has also the following address
settings (/etc/ppp/options.ttyd0):

    10.0.0.1:10.0.0.100

pppd connected to ttyd1 has also the following address
settings (/etc/ppp/options.ttyd1):

    10.0.0.1:10.0.0.101

>Fix:

No known fix at this time.

>Release-Note:
>Audit-Trail:

From: "Yar Tikhiy" <yar@comp.chem.msu.su>
To: <freebsd-gnats-submit@FreeBSD.org>,
	<martti.kuparinen@sl.sgn.ellemtel.net>
Cc:  
Subject: Re: kern/6318: pppd does not update wtmp on hangup
Date: Thu, 11 Oct 2001 18:32:29 +0400

 Does the problem persist in modern FreeBSD versions?
 The code looks to me like it has been fixed .
 
State-Changed-From-To: open->closed 
State-Changed-By: yar 
State-Changed-When: Thu Oct 11 07:51:59 PDT 2001 
State-Changed-Why:  
The bug has been fixed long ago. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=6318 
>Unformatted:
