[Pidgin] #14755: bonjour file transfer broken when IPv6 is activated in avahi

Pidgin trac at pidgin.im
Thu Dec 29 20:05:41 EST 2011


#14755: bonjour file transfer broken when IPv6 is activated in avahi
----------------------------------------------+-----------------------------
 Reporter:  tux                               |        Owner:  datallah
     Type:  defect                            |       Status:  new     
Milestone:                                    |    Component:  Bonjour 
  Version:  2.10.1                            |   Resolution:          
 Keywords:  bonjour ipv6 file transfer avahi  |  
----------------------------------------------+-----------------------------
Changes (by tux):

  * version:  2.10.0 => 2.10.1


Old description:

> When ipv6 is activated in avahi then libpurple/pidgin prefers and tries
> to do the file transfer via IPv6 as it should.
>
> However this fails:
> {{{
> proxy: Error connecting to 2001:6f8:587:0:4:64ff:fea4:29b2:47505
> (Connection refused).
> }}}
>
> To me it looks like the receiver side only creates an IPv4 listening
> socket and therefore does not accept IPv6 connection attempts:
> {{{
> $ sudo netstat -tulpen | grep pidgin
> tcp        0      0 0.0.0.0:47505           0.0.0.0:*
> LISTEN      1000       15154       17281/lt-pidgin
> tcp        0      0 0.0.0.0:5298            0.0.0.0:*
> LISTEN      1000       14747       17281/lt-pidgin
> tcp6       0      0 :::5298                 :::*
> LISTEN      1000       14746       17281/lt-pidgin
> }}}
>
> This might be the case due to the AF_INET in:
>
> libpurple/protocols/bonjour/bonjour_ft.c, bonjour_bytestreams_init() ->
> libpurple/network.c, purple_network_listen_range() ->
> purple_network_listen_range_family() -> purple_network_do_listen() ->
> listenfd = socket(AF_INET, socket_type, 0)
>
> I tested all this with two pidgin 2.10.0 instances on two Debian testing
> VMs. Plus the following patch posted to the mailing list:
> http://pidgin.im/pipermail/devel/2011-November/010482.html . This patch
> took me one step further, without it no accept-dialog and save-to-dialog
> popped up on the receiver side.
>
> Note: Even with this patch I suspect there might still be issues for the
> bonjour file transfer similar to the ones there were prior this patch for
> bonjour messaging with IPv6 for link local addresses.
>
> Also (as you can see in the log files too) this transfer was attempted
> via a global IPv6 address, use-ipv6=yes was set in /etc/avahi-
> daemon.conf. If I set this option to "no" then the whole handshaking
> prior the file transfer plus the actual file transfer itself are done via
> the IPv4 address (although the IPv6 ones are still listed and offered
> from the file receiver to the file sender in the prior handshake, but
> ignored by the file sender). And via IPv4 the file transfer is successful
> then.

New description:

 When ipv6 is activated in avahi then libpurple/pidgin prefers and tries to
 do the file transfer via IPv6 as it should.

 However this fails:
 {{{
 proxy: Error connecting to 2001:6f8:587:0:4:64ff:fea4:29b2:47505
 (Connection refused).
 }}}

 To me it looks like the receiver side only creates an IPv4 listening
 socket and therefore does not accept IPv6 connection attempts:
 {{{
 $ sudo netstat -tulpen | grep pidgin
 tcp        0      0 0.0.0.0:47505           0.0.0.0:*               LISTEN
 1000       15154       17281/lt-pidgin
 tcp        0      0 0.0.0.0:5298            0.0.0.0:*               LISTEN
 1000       14747       17281/lt-pidgin
 tcp6       0      0 :::5298                 :::*                    LISTEN
 1000       14746       17281/lt-pidgin
 }}}

 As you can see in the log files too this transfer was attempted via a
 global IPv6 address, use-ipv6=yes was set in /etc/avahi-daemon.conf. If I
 set this option to "no" then file transfers work again.

 The remaining [http://pidgin.im/pipermail/devel/2011-November/010493.html
 PATCH 2/4] seems to fix the issue for me.

--

-- 
Ticket URL: <http://developer.pidgin.im/ticket/14755#comment:2>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list