Summary: | net-dialup/ppp: pppoe-discovery don't work in ppp >=2.4.5 because of the patch pado-timeout.patch | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | wkg <wkg> |
Component: | New packages | Assignee: | Gentoo Dialup Developers <net-dialup> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | technoworx, wkg |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
is working pado-timeout.patch
really work pado-timeout.patch really!! work pado-timeout.patch |
Description
wkg
2012-03-02 11:00:38 UTC
Created attachment 305333 [details, diff]
is working pado-timeout.patch
i find a problem line in the pado-timeout.patch:
time_remain = timeout - (int)difftime(now, start);
difftime return double, and after (int) return NOT diff time.
for examle difftime return 1.331748e+09t, (int)1.331748e+09t = 1331747846
this is not what was expected in this case?
I suggest simply:
time_remain = timeout - ((int)start - (int)now);
or come up with something better, your version does not work because the next line always return:
if (time_remain <= 0) return;
as time_remain always get less than zero.
please change this patch in ebuild, or come up with another fix ...
p.s. sorry for my bad english ...
Created attachment 305339 [details, diff]
really work pado-timeout.patch
I'm sorry the previous message and the file was wrong
not
time_remain = timeout - ((int) start - (int) now);
and
time_remain = timeout - ((int) now - (int) start);
Created attachment 305351 [details, diff]
really!! work pado-timeout.patch
when the patch file ppp-2.4.5/pppd/plugins/rp-pppoe/discovery.c also the same error on that file affect I do not know ...
it is not needed for pppoe-discovery, so I will not notice ...
Excuse me, put my third time the file ...
Now I understand that it is not observed on amd64, only on x86 Can not reproduce this on current stable(2.4.5-r3) and latest unstable(2.4.6) net-dialup/ppp. Closing this as OBSOLETE |