[Adium-devl] Testing needed: Libgaim with NAT-PMP support

Evan Schoenberg evan at adiumx.com
Fri Mar 23 02:10:33 UTC 2007


On Mar 22, 2007, at 6:34 PM, Peter Hosey wrote:

> On Mar 22, 2007, at 07:10:44, Evan Schoenberg wrote:
>> [3] The code looks a bit suspicious as to how it handles failure  
>> at present... which I can't induce, even with disabling PMP in the  
>> airport config... as it tries 10 times with an exponentially  
>> increasing delay.
>
> That would certainly explain the multi-minute pinwheel on launch  
> for me in r19234.
>
> <Adium_4880.sample.txt>
>> sample Adium 60. Yes, that's right, *60*. As in one full minute of  
> sampling.

Sooooo... on a scale of 1 to "poorly thought-out specification", I'm  
giving the NAT-PMP draft (draft? but implemented in all of apple's  
stuff?) spec a 10.

The spec is at http://files.dns-sd.org/draft-cheshire-nat-pmp.txt and  
states:
The client SHOULD repeat this process with the interval between  
attempts doubling each time.
If, after sending its 9th attempt (and then waiting for 64 seconds),  
the client has still received no response, then it SHOULD conclude  
that this gateway does not support NAT Port Mapping Protocol and MAY  
log an error message indicating this fact.

The timeout starts at .25 seconds.  That means the *final* timeout is  
256 seconds.... with every doubled interval in between also  
attempted, in a blocking fashion in this case.  Ouch!

I think the most straightforward handling will be to ignore the  
recommendation, try it once with a .25 second delay, and go on with  
life if it fails.  A quarter second is still more than I'd like to  
wait but seems reasonable... Better would be it being nonblocking  
entirely, but that's going to be a whole lot more effort for fairly  
minor payoff.

What do you think?

-Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070322/a4a5cbab/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070322/a4a5cbab/attachment.sig>


More information about the devel mailing list