[pppd] increasing limit of transfered bytes - kernelbug?

Michael Schlenstedt (mailinglists_michael@schlenn.net)
Wed, 31 Jul 2002 18:20:17 +0200


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/