[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAKO=Kk5SA=KbWnnfzuzLY5pW9UX16zPuV_+Sv1P7LE7nezQzEg@mail.gmail.com>
Date: Mon, 10 Jun 2013 00:52:45 +0200
From: Quentin RAMEAU <quentin.rameau@...il.com>
To: netdev@...r.kernel.org
Subject: [iputils][ping] ip address resolution bug
Ping does not ensure it is resolving a hostname to an IPv4 address.
i.e. when setting 'options inet6' in resolv.conf, gethostbyname(3)
returns an IPv6 address, but ping handles it as in IPv4 address.
I attached a simple patch which replaces gethostbyname() with
gethostbyname2(), I'm not sure that is the best way to do it, feel
free to comment.
Quentin Rameau
Download attachment "ping-address-resolution.diff" of type "application/octet-stream" (320 bytes)
Powered by blists - more mailing lists