Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 406579 - net-dialup/ppp: pppoe-discovery don't work in ppp >=2.4.5 because of the patch pado-timeout.patch
Summary: net-dialup/ppp: pppoe-discovery don't work in ppp >=2.4.5 because of the patc...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Dialup Developers
Depends on:
Reported: 2012-03-02 11:00 UTC by wkg
Modified: 2014-06-04 07:56 UTC (History)
2 users (show)

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

is working pado-timeout.patch (pado-timeout.patch,6.37 KB, patch)
2012-03-14 18:43 UTC, wkg
Details | Diff
really work pado-timeout.patch (pado-timeout.patch,6.37 KB, patch)
2012-03-14 19:03 UTC, wkg
Details | Diff
really!! work pado-timeout.patch (pado-timeout.patch,6.37 KB, patch)
2012-03-14 19:53 UTC, wkg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description wkg 2012-03-02 11:00:38 UTC
if i'm delete from ebuild:
epatch "${WORKDIR}/patch/pado-timeout.patch"

then pppoe-discovery works fine.

Reproducible: Always

Steps to Reproduce:
1. install net-dialup/ppp>=2.4.5
2. run pppoe-discovery
Actual Results:  
# pppoe-discovery -I eth0
Timeout waiting for PADO packets

Expected Results:  
# pppoe-discovery -I eth0
Access-Concentrator: *****
AC-Ethernet-Address: **:**:**:**:**:**

if the network has no server pppoe, pppoe-discovery should not immediately give Timeout, with a bug he gives it right away.
Comment 1 wkg 2012-03-14 18:43:36 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 ...
Comment 2 wkg 2012-03-14 19:03:18 UTC
Created attachment 305339 [details, diff]
really work pado-timeout.patch

I'm sorry the previous message and the file was wrong
  time_remain = timeout - ((int) start - (int) now);
  time_remain = timeout - ((int) now - (int) start);
Comment 3 wkg 2012-03-14 19:53:05 UTC
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 ...
Comment 4 wkg 2012-09-03 06:41:53 UTC
Now I understand that it is not observed on amd64, only on x86
Comment 5 Sergey Popov gentoo-dev 2014-06-04 07:56:10 UTC
Can not reproduce this on current stable(2.4.5-r3) and latest unstable(2.4.6) net-dialup/ppp.

Closing this as OBSOLETE