Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130725144212.09f9933a@sibserver.ru>
Date: Thu, 25 Jul 2013 14:42:12 +0800
From: orc <orc@...server.ru>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] inet_ntop() and ipv4 address

On Thu, 25 Jul 2013 01:59:13 -0400
Rich Felker <dalias@...ifal.cx> wrote:

> On Thu, Jul 25, 2013 at 12:21:27PM +0800, orc wrote:
> > inet_ntop() does not embed plain ipv4 address at end (like
> > "::ffff:10.0.0.1"). This patch fixes it, but it is a bit ugly.
> > Without it is a bit harder to read logs of some daemons that
> > support only one address family socket binding and seeing output of
> > 'ss -tn'. Adopt if needed.
> 
> As I understand it, the "IPv4 compatible" addresses (::a.b.c.d) are
> deprecated and have never actually been used in deployed IPv6. Only
> the v4-mapped form (::ffff:a.b.c.d) is used/usable. For the most part,
> supporting the useless form seems harmless, but there is one harmful
> case: it looks like your code will wrongly convert :: to ::0.0.0.0
> instead of plain ::. Is it worth trying to keep the "v4 compatible"
> form supported and just special-casing ::, or should we just drop it?
> 
> Rich

I think it's still worth supporting ::ffff:a.b.c.d form, just quote
from my vsftpd logs:
CONNECT: Client "::ffff:a00:203" # (for 10.0.2.3)
Same output of 'ss -tn' when someone connected to IPv6-only listening
socket. IPv4 compatible addresses I taken from glibc.
Wrong convert: see my next message. It was my fault.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.