View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003944||unreal||ircd||public||2010-08-15 20:02||2010-08-16 11:33|
|Target Version||Fixed in Version||3.2.9-RC1|
|Summary||0003944: FreeBSD, IPv6 build, IPv4 listen blocks and *:port listen blocks|
|Description||OK, today I found a few issues with using UnrealIRCd 220.127.116.11 on FreeBSD 7.0 with IPv6 support enabled. Those issues are:|
A) "listen *:6667;" only listens on IPv6 IP's (http://bugs.unrealircd.org/view.php?id=2741 suggests a solution that requires root which isnt an option for everyone)
B) A listen block specifying an IPv4 IP (both "18.104.22.168:6667" and "[::ffff:22.214.171.124]:6667" forms) fails with an error suggesting another solution, once again requiring root.
So having found a solution that does not require root, I have attached a .diff with a solution to BOTH issues.
|Tags||No tags attached.|
|3rd party modules|
unreal-ipv6-bsd.diff (458 bytes)
||I like this ++|
This is already in latest CVS ;)
#if defined(INET6) && defined(IPV6_V6ONLY)
/* We deal with both IPv4 and IPv6 in one (listen) socket.
* This used to be on by default, but FreeBSD, and much later Linux
* sometimes as well, seem to default it to IPv6 only ('1').
* We now have this new fancy option to turn it off in Unreal,
* instead of requiring our users to sysctl.
opt = 0;
if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (OPT_TYPE *)&opt,
sizeof(opt)) < 0)
report_error("setsockopt(IPV6_V6ONLY) %s:%s", cptr);
Anyway, I never got an opportunity to test it. But it works?
This code is already in CVS.
One note I'd like to make, however, is that on certain installations, setsockopt() _does_ return nonzero and spits a bunch of ``setsockopt(IPV6_V6ONLY)'' errors into ircd.log when it seems that there is no need to report such an error. (i.e., the setsockopt() call fails even though the IPv4 over IPv6 stuff is working find).
||Ugh, I should'nt've touched this bug, I've only messed up its state :-/.|
Yes this does work on FreeBSD 7.0. But it is worth noting that this will not work on Windows due to Windows lack of dual stack support. So in case you haven't already (your paste didn't mention it) you should make sure this fix only applies to non-windows builds at the very least.
As for already being in CVS, I suppose I really should have checked first. :P
Ok, glad to hear it actually works :)
Jobe: as for windows, we don't support IPv6 on windows, see 0000008
ohnobinki: good point, now got rid of any possible warning in CVS .868:
- Get rid of any setsockopt(IPV6_V6ONLY) errors in ircd.log (0003944).
|2010-08-15 20:02||Jobe1986||New Issue|
|2010-08-15 20:02||Jobe1986||File Added: unreal-ipv6-bsd.diff|
|2010-08-15 20:05||warg||Note Added: 0016274|
|2010-08-15 21:09||syzop||Note Added: 0016275|
|2010-08-15 22:08||ohnobinki||QA||=> Not touched yet by developer|
|2010-08-15 22:08||ohnobinki||U4: Need for upstream patch||=> No need for upstream InspIRCd patch|
|2010-08-15 22:08||ohnobinki||Note Added: 0016276|
|2010-08-15 22:08||ohnobinki||Status||new => resolved|
|2010-08-15 22:08||ohnobinki||Fixed in Version||=> 3.2.9-RC1|
|2010-08-15 22:08||ohnobinki||Resolution||open => fixed|
|2010-08-15 22:08||ohnobinki||Assigned To||=> ohnobinki|
|2010-08-15 22:08||ohnobinki||Relationship added||child of 0003776|
|2010-08-15 22:09||ohnobinki||Status||resolved => assigned|
|2010-08-15 22:09||ohnobinki||Assigned To||ohnobinki => syzop|
|2010-08-15 22:11||ohnobinki||Note Added: 0016277|
|2010-08-15 22:26||Jobe1986||Note Added: 0016278|
|2010-08-15 22:27||Jobe1986||Note Edited: 0016278|
|2010-08-16 11:33||syzop||Note Added: 0016282|
|2010-08-16 11:33||syzop||Status||assigned => resolved|