Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 406579

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 packagesAssignee: 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
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
not
  time_remain = timeout - ((int) start - (int) now);
and
  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