View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003163||unreal||ircd||public||2006-12-24 14:55||2007-09-05 15:08|
|Target Version||Fixed in Version||3.2.8|
|Summary||0003163: Allow 184.108.40.206 style IPs in IPv6 mode (not only ::ffff:220.127.116.11) // cgiirc block does not work w/ipv6|
|Description||As the title says, the cgiirc block does not work when compiled with ipv6 support.|
The reason is because when u use the format hostname "18.104.22.168" it gets an error stating that all ips must be in the format ::ffff:22.214.171.124
when you change it to that format, the host simply does not match, making the cgiirc block useless
|Tags||No tags attached.|
|3rd party modules|
||I'll see if I cant test this later|
That's why the IP handling thingie should be rewritten sometime, this also gives problems with OpenBSD and ::ffff:-style addresses on an IPv6-enabled UnrealIRCd, it is hardcoded and the sysctl for that cannot be changed (Operation not permitted), thus making UnrealIRCd useless for listening on IPv4 when it is IPv6-enabled on OpenBSD...
Actually this has little to do with the socket type, Robby22.
We decided a while ago that '126.96.36.199' should be auto converted to '::ffff:188.8.131.52' anyway (and then not reject the '184.108.40.206' form in ipv6 mode).
Perhaps we can use this bugreport for that :P
EDIT: For the record, with auto-converted, we mean that 220.127.116.11 *in the configfile* should be auto-converted to ::ffff:18.104.22.168, this is true for: cgi irc blocks, but also listen blocks, and link blocks, ... and more?
||This appears to still be a problem in 3.2.7.|
Unreal-3.2.7-ipv6.diff (2,292 bytes)
Attached a patch, converts IPv4 to IPv6 style addresses. Doesn't actually do anything to CGI::IRC, so isn't complete. This is proof-of-concept.
I may be able to remove the goto and reentrant var, but I was trying to be conservative.
Would greatly appreciate an audit. If it's correct, you should be able to take the link::hostname part and copy it to cgi-irc.
||new patch using MyMalloc and MyFree, per stskeeps|
Unreal-3.2.7-ipv6-v3.diff (2,107 bytes)
||ok, forgot to upload the v2 patch, but -v3 should do everything that stskeeps suggested, except it still doesn't do anything to cgi-irc|
Unreal-3.2.7-ipv6-v4.diff (3,094 bytes)
||v4 is near identical to -v3, but includes the cgiirc blocks.|
||i'll review this somewhere in the next few weeks, would like this in 3.2.8.|
fixed in .680:
- Now allowing '22.214.171.124' ips again in IPv6 mode as well (instead of enforcing
'::ffff:126.96.36.199' ips in the conf, they are now auto-converted to that).
Based on patch from tabrisnet.
- Fixed issue where the cgiirc block did not work with IPv6, reported by
djGrrr, fixed by previous change.
Just for educational purposes, the diff..
changes re tabrisnet patch:
- no C99 declaration-after-statement
- use stack not heap for temporary storage
- no 'ip' memleak / just don't care about setting 'ip' anyway // merging 2 snprintfs to 1
- inet_pton instead of inet_aton, this is debatable though but I just trust this better (like you set the 2nd arg to NULL, not found in posix, so maybenot crossplatform ok)
that's all, patch was still useful though! ;p
|2006-12-24 14:55||djGrrr||New Issue|
|2006-12-25 08:24||syzop||Product Version||3.2.7 => 3.2.6|
|2006-12-25 17:34||Bricker||Note Added: 0012902|
|2006-12-26 12:47||Robby22||Note Added: 0012907|
|2006-12-26 12:49||Robby22||Note Edited: 0012907|
|2006-12-28 10:02||syzop||Note Added: 0012930|
|2006-12-28 10:02||syzop||Status||new => acknowledged|
|2006-12-28 10:02||syzop||Summary||cgiirc block does not work when compiled with ipv6 => Allow 188.8.131.52 style IPs in IPv6 mode (not only ::ffff:184.108.40.206) // cgiirc block does not work w/ipv6|
|2007-04-30 10:00||syzop||Relationship added||related to 0003311|
|2007-04-30 12:45||syzop||Note Edited: 0012930|
|2007-05-08 13:54||syzop||Relationship added||child of 0003111|
|2007-07-22 12:51||tabrisnet||Note Added: 0014547|
|2007-07-22 15:20||tabrisnet||File Added: Unreal-3.2.7-ipv6.diff|
|2007-07-22 15:22||tabrisnet||Note Added: 0014549|
|2007-07-22 15:40||tabrisnet||Note Added: 0014550|
|2007-07-22 17:54||tabrisnet||File Added: Unreal-3.2.7-ipv6-v3.diff|
|2007-07-22 17:55||tabrisnet||Note Added: 0014551|
|2007-07-22 19:20||tabrisnet||File Added: Unreal-3.2.7-ipv6-v4.diff|
|2007-07-22 19:20||tabrisnet||Note Added: 0014554|
|2007-09-04 05:28||syzop||Relationship added||child of 0003454|
|2007-09-04 05:32||syzop||Note Added: 0014751|
|2007-09-05 15:08||syzop||QA||=> Not touched yet by developer|
|2007-09-05 15:08||syzop||U4: Need for upstream patch||=> No need for upstream InspIRCd patch|
|2007-09-05 15:08||syzop||Status||acknowledged => resolved|
|2007-09-05 15:08||syzop||Fixed in Version||=> 3.2.8|
|2007-09-05 15:08||syzop||Resolution||open => fixed|
|2007-09-05 15:08||syzop||Assigned To||=> syzop|
|2007-09-05 15:08||syzop||Note Added: 0014753|