Unreal3.2.10.4, webirc, and kiwiirc

These are old archives. They are kept for historic purposes only.
Post Reply
Shdwdrgn
Posts: 2
Joined: Wed Jun 03, 2015 4:36 pm

Unreal3.2.10.4, webirc, and kiwiirc

Post by Shdwdrgn » Wed Jun 03, 2015 7:58 pm

I seem to be having a problem with IPv6 users. I have webirc working correctly for IPv4 users under both cgi:irc and kiwiirc, and IPv6 appears to work fine for cgi:irc, but kiwiirc is munging up the user's address.

When checking ircd.log, a user connecting to cgi:irc will show like this (full address hidden):

Code: Select all

ipv6_testuser!cgiirc@2001:xxx:xxxx:x:xxxx:xxxx:xxxx:xxxx [VHOST AFED03AE:B2D362AD:2F7E29EA:IP]
ipv4_testuser!xxxxxxxx@xx-xx-xx-xx.isp.net [VHOST myIRC-549B6C29.isp.net]
However when they connect through kiwiirc, ircd.log shows this (note that the ipv4 user shows exactly the same info for both scripts):

Code: Select all

ipv6_testuser!7d1@::255.255.32.1 [VHOST F4C46FD5:77F295CB:5BBE8754:IP]
ipv4_testuser!xxxxxxxx@xx-xx-xx-xx.isp.net [VHOST myIRC-549B6C29.isp.net]
As you can see, the IPv6 address is being rewritten as an invalid IPv4 address, which in itself causes problems with unreal refusing multiple connections from the "same" address, and would make it difficult to ban someone.

I've been trying to work with the kiwirc devs for the past several days on this issue, and now I'm being told to file a bug report with unrealircd because webirc is not handling IPv6 correctly. It's been a long time since I've run an irc chat, and I'm not up to speed on web-based chat scripts, so I'm hoping to get some help here. I've confirmed that unreal was compiled with IPv6 support, and users have no trouble connecting directly with a client or via cgi:irc with IPv6, but under kiwiirc users can only randomly connect via IPv6 and the after the first connection the log file starts an infinite loop of spitting out connection errors, even after the user has given up and closed the page. So what am I missing here? Why do the kiwiirc folks think this is a problem with unreal's support of webirc? If webirc is working under IPv4, shouldn't that mean that I have it set up correctly, or did I miss something critical for IPv6 support?

Any help is appreciated!

Shdwdrgn
Posts: 2
Joined: Wed Jun 03, 2015 4:36 pm

Re: Unreal3.2.10.4, webirc, and kiwiirc

Post by Shdwdrgn » Wed Jun 03, 2015 10:21 pm

Problem solved. Line 180 in kiwi/server/weblistener.js was meant to strip port numbers on IIS servers by removing everything after the colon... That has an undesired affect on IPv6 addresses. Since I'm not running IIS, I simply removed the line and IPv6 appears to be working fine now.

Syzop
UnrealIRCd head coder
Posts: 1806
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: Unreal3.2.10.4, webirc, and kiwiirc

Post by Syzop » Thu Jun 04, 2015 8:42 pm

Ah, good catch then. I was wondering already when I saw this :D

Post Reply