[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] bug: inetd does not map IPv6 to IPv4

From: Guillem Jover
Subject: Re: [bug-inetutils] bug: inetd does not map IPv6 to IPv4
Date: Fri, 5 Jan 2018 14:21:49 +0100
User-agent: Mutt/1.9.2 (2017-12-15)


On Thu, 2018-01-04 at 12:36:36 +0100, Ferruccio Fantozzi wrote:
> 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.

Yes, the original patch implementing this worked fine, but it was
modified while being committed, which broke it, I complained at the
time, but it was never rectified:


> 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).

In Debian, I rebased my original patch, and have been keeping that
delta applied there:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]