Friday, May 2, 2008 - New servers are in! Click-in for more info!
VoyForums

VoyUser Login optional ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1[2]34 ]
Subject: Re: Bug report: discovery fails if non-expected packets hit interface


Author:
David F. Skoll
[ Next Thread | Previous Thread | Next Message | Previous Message ]
Date Posted: 17:47:06 2006-07-28 Fri
Author Host/IP: 209.217.122.117
In reply to: Mike Ireton 's message, "Bug report: discovery fails if non-expected packets hit interface" on 15:39:45 2006-07-28 Fri

>The problem however is that if a packet is received,
>and it's not destined for or or not a pado, the loop
>is looped. And the tv structure is re-initialized
>again, giving it anohter 5,10 or or 40 seconds with
>which to sit and listen for more packets. So one
>packet every x number of seconds (where x < timeout
>value) is enough to keep the loop going indefinately.

Well, it won't go indefinitely. As soon as a PADO is
received, it will break out of the loop. Of course, if
the PADO is lost *and* you keep getting more packets, it
will sit indefinitely, but that would only happen if a
malicious person were sending PPPoE discovery packets to
you.

>In my test version I have moved the initialization of
>tv to outside of the do loop and that seems to me to
>be the correct solution as select decrements tv and
>eventually it'll reach zero (or we get the packet
>we're waiting for).

That's not portable; select() is not guaranteed to modify
tv in the (useful) way you describe. A proper fix would
call gettimeofday() to see how much time we should
initialize tv to each time through the loop.

I don't think this is a serious enough problem in the
real world to be worth a fix, but if enough people
disagree, I will fix it.

Regards,

David.

[ Next Thread | Previous Thread | Next Message | Previous Message ]

Replies:
Subject Author Date
Re: Bug report: discovery fails if non-expected packets hit interfaceMike Ireton (The insane laughing clown of wireless broadband)11:27:56 2006-07-29 Sat


[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 2.94, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2008 Voyager Info-Systems. All Rights Reserved.