Opened at 2010-07-06T09:38:22Z
Closed at 2010-08-07T14:57:28Z
#644 closed enhancement (fixed)
Using IPv6 to connect into XMPP-server
Reported by: | Owned by: | wilmer | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Jabber | Version: | 1.2.7 |
Keywords: | IPv6, jabber, xmpp | Cc: | |
IRC client+version: | Client-independent | Operating System: | Linux |
OS version/distro: |
Description
I'd hope that I could connect into XMPP-server using IPv6. Maybe some setting or specifying somthing like "-6" in server addition.
And more generally maybe a some setting where Bitlbee would prefer IPv6 over IPv4 in generally connecting somewhere, changeable ofcourse :)
Attachments (2)
Change History (8)
Changed at 2010-08-01T09:00:38Z by
Attachment: | bitlbee-otr-ipv6.diff added |
---|
comment:1 Changed at 2010-08-01T09:00:54Z by
Hi everyone,
Attached is the diff which adds IPv6
support to BitlBee. when AAAA
records are found. This code uses getaddrinfo
function.
tcp 0 0 2001:470:19:151:9:44073 2001:6f8:900:906:::5222 EST tcp 0 0 ::ffff:172.18.33.:58651 ::ffff:174.129.226:5222 EST tcp 0 0 ::ffff:172.18.33.:54291 ::ffff:208.68.163.:5222 EST tcp 0 0 ::ffff:172.18.33.:33241 ::ffff:208.93.0.12:5222 EST tcp 0 0 ::ffff:172.18.33.:39723 ::ffff:72.14.203.1:5222 EST
The sockets are created of type AF_INET6
and IPv4
addresses are represented as IPv6
addresses of type IPv4-mapped addresses.
ATM, its only tested on GNU/Linux
. I'll test with FreeBSD
in a day or two.
www.swissjabber.ch offers free XMPP server hosted on IPv6 internet, in case you want to test \o/
comment:2 Changed at 2010-08-01T09:11:38Z by
For any comments or help please post here. Sorry posted last message as anonymous
.
comment:3 Changed at 2010-08-01T18:31:59Z by
Please discard the previous diff.
The attached diff works for FreeBSD
also. As long as global interface out option is not used this works great.
Changed at 2010-08-01T18:32:44Z by
Attachment: | patch-lib_proxy.c added |
---|
BitlBee IPv6 support diff (updated)
comment:4 follow-up: 5 Changed at 2010-08-03T11:44:09Z by
Sweet! I'll merge this in a few days, want to take a closer look at the diff.
The ClientInterface detail is a bit unfortunate, may be nice to find a solution for that later. (A ClientInterface6 or something, maybe.)
comment:5 Changed at 2010-08-03T14:03:01Z by
Replying to wilmer:
Sweet! I'll merge this in a few days, want to take a closer look at the diff.
Thanks.
The ClientInterface detail is a bit unfortunate, may be nice to find a solution for that later. (A ClientInterface6 or something, maybe.)
BtW in FreeBSD
, the IPv4 connections are created via AF_INET
sockets, as opposed to AF_INET6
sockets for all type of connections in GNU/Linux, as the getaddrinfo()
implementation in libc
of FreeBSD
doesn't return IPv4 mapped addresses.
comment:6 Changed at 2010-08-07T14:57:28Z by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Applied in changeset:devel,643.
The V4MAPPED stuff was causing troubles on my Linux machine as well so I just removed it. If at some point someone really wants a clientinterface-like thing for IPv6 we can add that later.
Stuff also got a lot simpler by just passing the port number to getaddrinfo(), it'll then generate a fully functional struct sockaddr already.
Thanks!
BitlBee IPv6 support diff