View Issue Details

IDProjectCategoryView StatusLast Update
0004193unrealircdpublic2013-05-23 05:52
ReporterJobe1986Assigned Tonenolod 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.2.10.1 
Target VersionFixed in Version3.4-alpha1 
Summary0004193: Ident lookup socket() does not disable IPV6_V6ONLY
DescriptionSummary says it all really. The socket used for ident lookups does not explcitly disable IPV6_V6ONLY. So on IPv6 enabled builds on systems where the system value for v6only is enabled, ident lookups for IPv4 users will fail.

Relates in part to bug 0003944
TagsNo tags attached.
3rd party modules

Activities

falconkirtaran

2013-05-16 05:04

reporter   ~0017574

Patch, which propagates a similar fix to the one in bug 0003944.

falconkirtaran

2013-05-16 05:04

reporter  

4193_ip6_ident.diff (699 bytes)

nenolod

2013-05-18 09:36

reporter   ~0017585

Falcon: i think the real solution here would be to redo the ipv6 code to treat ipv4 and ipv6 separately (using sockaddr_storage). Thoughts?

falconkirtaran

2013-05-19 09:18

reporter   ~0017587

Having some abstraction is valuable in the code, and the need to explicitly specify listening on all ipv6 addresses as well as ipv4 addresses is inconvenient. That said, I believe the intention of sockaddr_storage is to be able to use the same structure to store both ipv6 and ipv4 addresses; consequently it might be sufficient to just replace all the sockaddr structures, and ensure IPV6_V6ONLY is unset on all sockets.

sockaddr_storage has been around for sufficiently long (about 15 years) and is sufficiently standard (POSIX IEEE1003.1-2004) that, though it was introduced for ipv6, it should be possible to assume its presence (even windows CE 5.0 has it).

Jobe1986

2013-05-19 17:19

reporter   ~0017600

Last edited: 2013-05-19 17:21

View 2 revisions

This bug isn't really about the normal listeners but about an assumption the ident lookup code makes that is becoming more incorrect as more OS' enable V6ONLY by default.

But regarding listeners, there are some OS' (such as windows and openbsd) that cannot use an AF_INET6 socket for IPv4 connections due to kernel level restrictions. In openbsd's case that's hard coding V6ONLY to being enabled and preventing setsockopt() from disabling it. So the only way to listen on both IPv6 and IPv4 at the same time (only needed for *:port) is to listen on AF_INET6 and AF_INET4 separately and explicitly enabling V6ONLY to counteract OS which have it disabled by default. As for ip:port listeners, they need only listen on the AF_* of the IP address specified.

nenolod

2013-05-19 23:03

reporter   ~0017603

http://hg.unrealircd.org/hg/unreal/rev/1dc84d1ee71b

Issue History

Date Modified Username Field Change
2013-05-15 23:20 Jobe1986 New Issue
2013-05-16 05:04 falconkirtaran Note Added: 0017574
2013-05-16 05:04 falconkirtaran File Added: 4193_ip6_ident.diff
2013-05-18 09:36 nenolod Note Added: 0017585
2013-05-19 09:18 falconkirtaran Note Added: 0017587
2013-05-19 17:19 Jobe1986 Note Added: 0017600
2013-05-19 17:21 Jobe1986 Note Edited: 0017600 View Revisions
2013-05-19 23:03 nenolod Note Added: 0017603
2013-05-19 23:03 nenolod Status new => resolved
2013-05-19 23:03 nenolod Fixed in Version => 3.4-alpha1
2013-05-19 23:03 nenolod Resolution open => fixed
2013-05-19 23:03 nenolod Assigned To => nenolod