Hi all,
I think I found a problem in the way inetd maps IPv4/IPv6 connections.
When protocol in inetd.conf is set as
'tcp': inetd accepts IPv4 connections only
'tcp4': same as above
'tcp6only': inetd accepts IPv6 connections only
'tcp6': same as above.
The problem is with the latter 'tcp6': I think
inetd should accept both IPv6 and IPv4 in this case.
In inetd.c function getconfigent() line 1119, we have
if (sep->se_proto[3] == '6')
{
sep->se_family = AF_INET6;
sep->se_v4mapped = 0;
/* Check for tcp6only and udp6only. */
if (strcmp (&sep->se_proto[3], "6only") == 0)
sep->se_v4mapped = 0;
}
se_v4mapped is set to 0 for both 'tcp6' and 'tcp6only'.
I do not think this is what was intended?
Or is there another way to set se_v4mapped=1 when se_family=AF_INET6?
Proposed patch attached... There is no need to set se_v4mapped=1 here,
because it is the default (line 1114).
Regards,