Opened 8 years ago

Last modified 4 years ago

#14390 new enhancement

Title: Pidgin (2.9.0) Windows - incorrectly detects IP address when multiple network adapters are detected, causing file transfer to fail.

Reported by: jonathan Owned by: deryni
Milestone: Component: XMPP
Version: 2.9.0 Keywords:
Cc: jonathan.fernandez@…

Description (last modified by darkrain42)

Pidgin is used in LAN, server is on the same subnet (192.168.9.x), however Pidgin auto detect seems to radomly detect and use all installed network adapters addresses, including invalid ones like 169.254.65.* and 0.0.0.0. Worst, manual IP setting does not seem to make any difference. This bad detection causes XMPP file transfer to often fail, transfer slowly starts or receving side crashes, even with configured IP and a file proxy. Here is the file transfer request generated by pidgin:

<iq from='jonathan@server-pc/924824306131037034820002' to='niki@server-pc/3663187984131042080451492' type='set' id='purpled4e8a704'>
   <query xmlns='http://jabber.org/protocol/bytestreams' sid='purpled4e8a703'>
       <streamhost jid='jonathan@server-pc/924824306131037034820002' host='192.168.116.1' port='53379'/>
       <streamhost jid='jonathan@server-pc/924824306131037034820002' host='192.168.56.1' port='53379'/>
       <streamhost jid='jonathan@server-pc/924824306131037034820002' host='169.254.65.217' port='53379'/>
       <streamhost jid='jonathan@server-pc/924824306131037034820002' host='192.168.9.58' port='53379'/>
       <streamhost jid='jonathan@server-pc/924824306131037034820002' host='0.0.0.0' port='53379'/>
       <streamhost jid='jonathan@server-pc/924824306131037034820002' host='0.0.0.0' port='53379'/>
       <streamhost jid='jonathan@server-pc/924824306131037034820002' host='127.0.0.1' port='53379'/>
       <streamhost jid='proxy.server-pc' host='192.168.9.128' port='7777'/>
   </query>
</iq>

The server and file proxy is 192.168.9.128, actual sender IP is 192.168.9.58, the hardcoded IP in prefs is 127.0.0.1. Receiving Pidgin will try all IPs in a row, time out on every, or just crash.

Why the hardcoded IP is not used first, and then the file proxy?

Change History (4)

comment:1 Changed 8 years ago by MarkDoliner

  • Component changed from AIM to XMPP
  • Owner changed from MarkDoliner to deryni

comment:2 Changed 8 years ago by darkrain42

  • Description modified (diff)
  • Type changed from defect to enhancement

I see three distinct issues:

  • If you're ever getting a crash, please get a backtrace and attach it to this ticket.
  • We should certainly not generate 0.0.0.0 as a valid streamhost. I'm a little surprised your OS returned that while enumerating local IP addresses.
  • A request to add more intelligence to which addresses are attempted in what order, e.g. looking for overlap and trying those first.

(in addition, if we had the ability to have multiple simultaneous attempts going on at once, that would slightly obviate the third bullet point)

comment:3 Changed 8 years ago by noccy

Got this trying to accept a file from a friend running Pidgin 2.9.0 on Windows 7. The transfer failed but by explicitly setting the IP in her client the file made it through.

<iq type="set" id="purplebb933170" to="xxx@gmail.com/pidginCEB24930" from="yyy@gmail.com/D411D0E0">
  <byt:query sid="purplebb93316f" xmlns:byt="http://jabber.org/protocol/bytestreams"> 
    <byt:streamhost jid="yyy@gmail.com/D411D0E0" host="192.168.0.12" port="63074"/>
    <byt:streamhost jid="yyy@gmail.com/D411D0E0" host="0.0.0.0" port="63074"/>
    <byt:streamhost jid="yyy@gmail.com/D411D0E0" host="83.93.57.xxx" port="63074"/>
  </byt:query>
</iq>

comment:4 Changed 4 years ago by evert_mouw

I've submitted a patch with a description about how I approached the problems mentioned here. See #16535

Last edited 4 years ago by evert_mouw (previous) (diff)
Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!