Date: Thu, 10 Jun 1999 14:57:35 +0100 (BST) From: rsmith@trltech.co.uk To: FreeBSD-gnats-submit@freebsd.org Subject: bin/12115: pppd reports wrong connected duration with demand option Message-ID: <199906101357.OAA01338@rdls.sw.wan>
index | next in thread | raw e-mail
>Number: 12115
>Category: bin
>Synopsis: pppd reports wrong connected duration with demand option
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jun 10 07:00:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator: Richard Smith
>Release: FreeBSD 3.1-RELEASE i386
>Organization:
TRL Technology Ltd
>Environment:
FreeBSD ns.wan 3.1-RELEASE FreeBSD 3.1-RELEASE #0: Thu Jun 3 16:11:34 BST 1999 richard@ns2.wan:/usr/src/sys/compile/GATEKEEPER i386
>Description:
Using pppd for dial-on-demand over a dial-up ISDN line to our ISP. Whenever the line drops, pppd reports the connected duration in minutes using syslog(3), priority LOG_NOTICE. Unfortunately pppd calculates the duration from when pppd was started, not from when the line went up.
>How-To-Repeat:
Add the 'demand' keyword to the /etc/ppp/options file.
>Fix:
*** main.c.original Wed Jun 2 14:32:49 1999
--- main.c Wed Jun 2 14:59:51 1999
***************
*** 509,514 ****
--- 509,521 ----
close(i);
}
+ if (demand) {
+ /*
+ * dial-on-demand: connected time starts now
+ */
+ stime = time((time_t *) NULL);
+ }
+
/* run welcome script, if any */
if (welcomer && welcomer[0]) {
if (device_script(welcomer, ttyfd, ttyfd) < 0)
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906101357.OAA01338>
