Subject: Re: inet_pton() spec non-conformance
To: None <tech-net@netbsd.org>
From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
List: tech-net
Date: 02/07/2000 14:43:20
On Mon, Feb 07, 2000 at 10:26:41PM +0900, itojun@iijlab.net wrote:
>
> > inet_pton() included in src/lib/libc/net is not spec conformant.
>
> http://cvsweb.netbsd.org/bsdweb.cgi/basesrc/lib/libc/net/inet_pton.c
> 1.2 -> 1.3
> was the change really the right one? shouldn't this be addressed
> by changing gethostbyname2() (and child functions) instead?
Uhm... the change was to check for overflows! It already misbehaved before!
If I understand the issue, you want to change inet_aton() and inet_addr().
if inet_pton may not do historical processing, my suggestion is to create a
new inet_pton4_internal with an additional flag parameter.
if flag 0, accept historical addresses
if flat 1, don't.
then call inet_pton4_internal(...,...,1) from inet_pton4() and
inet_pton4_internal(...,...,0) from inet_addr and inet_aton.
Regards,
-is
--
* Progress (n.): The process through which Usenet has evolved from
smart people in front of dumb terminals to dumb people in front of
smart terminals. -- obs@burnout.demon.co.uk (obscurity)