Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145313 - net-dialup/ppp-2.4.4 - maxoctets 2G limit
Summary: net-dialup/ppp-2.4.4 - maxoctets 2G limit
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Highest normal (vote)
Assignee: Gentoo Dialup Developers
Depends on:
Reported: 2006-08-27 23:10 UTC by Serhij S. Stasyuk
Modified: 2006-08-28 22:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

maxoctets_2Glimit.patch (maxoctets_2Glimit.patch,606 bytes, patch)
2006-08-27 23:12 UTC, Serhij S. Stasyuk
Details | Diff
modified ppp-2.4.3-r16.ebuild (ppp-2.4.3-r16.ebuild,11.33 KB, text/plain)
2006-08-27 23:13 UTC, Serhij S. Stasyuk

Note You need to log in before you can comment on or make changes to this bug.
Description Serhij S. Stasyuk 2006-08-27 23:10:56 UTC
Hi all!

I have encountered a problem with ppp-2.4.3 (server mode), but as I can see in source, this problem exists at last in 2.4.2 and 2.4.4. I am using billing which (if there is no limit) says that limit is 2147483648. If there is no traffic, used is 0. In pppd/auth.c we can see such code:

    diff = maxoctets - used;
    if(diff < 0) {
        notice("Traffic limit reached. Limit: %u Used: %u", maxoctets, used);
        lcp_close(0, "Traffic limit");
        need_holdoff = 0;
        status = EXIT_TRAFFIC_LIMIT;
    } else {
        TIMEOUT(check_maxoctets, NULL, maxoctets_timeout);

where diff is declared in next way:
int diff;

So, if I have maxoctets set to 2147483648 (0x80000000), the first thing I see after login in log is:
Traffic limit reached. Limit: 2147483648 Used: 0

and ppp session is disconnected.

I don't know why the problem was not detected by me with ppp-2.4.2 (maybe MAXOCTETS was not defined in config?).

I don't know what was the reason of this comparison and if this bugzilla is the right place for this bug, but if anybody can contact ppp developers directly, pls, ask them to correct this code.

Due to stable mark of ppp-2.4.3, I am marking this issue with major severity and P1 priority.
Comment 1 Serhij S. Stasyuk 2006-08-27 23:12:20 UTC
Created attachment 95247 [details, diff]

small patch to fix this issue
Comment 2 Serhij S. Stasyuk 2006-08-27 23:13:20 UTC
Created attachment 95248 [details]
modified ppp-2.4.3-r16.ebuild

added one line with epatch
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2006-08-28 10:41:28 UTC
fixed in ppp-2.4.4-r1. thanks for the report, but I don't think it is a bug. More like an improvement if you ask me.

Since you are the author of the patch, you should submit it to upstream at If you don't want to post the same thing twice, you can put the URL of this bug in the upstream bug report. 
Comment 4 Serhij S. Stasyuk 2006-08-28 13:07:34 UTC
Thanks a lot. It would be great if it is also fixed in ppp-2.4.3-r17?.
Bug now filed in ppp bugs under
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2006-08-28 14:36:08 UTC
For what purpose? I plan to mark the 2.4.4 version stable in about month and yet another testing version will not be marked stable any time sooner anyway.
Comment 6 Serhij S. Stasyuk 2006-08-28 22:27:27 UTC
Ok, ic. Thanks.
So marking now as closed