linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [pppd] increasing limit of transfered bytes - kernelbug?
@ 2002-07-31 16:20 Michael Schlenstedt
  0 siblings, 0 replies; only message in thread
From: Michael Schlenstedt @ 2002-07-31 16:20 UTC (permalink / raw)
  To: paulus; +Cc: ppp-bugs, Kernel Mailinglist

Dear all!

I wrote a little script which logs the amount of bytes which were transfered
over a ppp-line (ADSL/PPPoE).

The problem: this only works untill you do not transfer more than 2 GB
(pppd-limit) or 4 GB (kernel-limit).

Within pppd it seems that there is a problem with the $BYTES_RECVD and
$BYTES_SENT variables which can be used in /etc/ppp/ip-up and -down.

PPPD uses "signed int"-counters instead of an "unsigned-int". This is
not a great problem, a patch is attached to this email (thanks to Evgeni
Gechev).

Unfortunately, this only increases the amount of transfered bytes to 4
GB (kernel-limit).

Is there any chance to increase the kernel-limit in feature
kernel-releases?

Bye,
Michael

,----[ pppd patch ]-
| 
| --- main.c      Fri Jan 25 15:03:38 2002
| +++ main.c.etg  Fri Jul  5 00:18:25 2002
| @@ -1090,9 +1090,9 @@
| 
|      slprintf(numbuf, sizeof(numbuf), "%d", link_connect_time);
|      script_setenv("CONNECT_TIME", numbuf, 0);
| -    slprintf(numbuf, sizeof(numbuf), "%d", link_stats.bytes_out);
| +    slprintf(numbuf, sizeof(numbuf), "%u", link_stats.bytes_out);
|      script_setenv("BYTES_SENT", numbuf, 0);
| -    slprintf(numbuf, sizeof(numbuf), "%d", link_stats.bytes_in);
| +    slprintf(numbuf, sizeof(numbuf), "%u", link_stats.bytes_in);
|      script_setenv("BYTES_RCVD", numbuf, 0);
|  }
| 
`----


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-31 16:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-31 16:20 [pppd] increasing limit of transfered bytes - kernelbug? Michael Schlenstedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).