lkml.org 
[lkml]   [2002]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[pppd] increasing limit of transfered bytes - kernelbug?
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);
| }
|
`----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.034 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site