bin/88241: [ PATCH ] Incorrect processing of multiple PTR records
Dan Lukes
dan at obluda.cz
Sun Oct 30 07:40:25 PST 2005
>Number: 88241
>Category: bin
>Synopsis: [ PATCH ] Incorrect processing of multiple PTR records
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Oct 30 15:40:19 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Dan Lukes
>Release: FreeBSD 6.0-RC1 i386
>Organization:
Obludarium
>Environment:
System: FreeBSD 6.0-RC1 #6: Sun Oct 16 21:03:18 CEST 2005 i386
lib/libc/net/name6.c,v 1.54 2005/05/27 20:44:57 ume
lib/libc/net/res_config.h,v 1.8 2002/03/22 23:41:54 obrien
>Description:
res_config.h define MULTI_PTRS_ARE_ALIASES
It causes the gethostbyname() fold multiple PTR records into h_aliases
member of struct hostent
The KAME's getipnodebyaddr() code honor the MULTI_PTRS_ARE_ALIASES
define also, but res_config.h isn't included into linc/net/names6.c nor
other include define the flag. So getipnodebyaddr() ignore the multiple PTRs.
>How-To-Repeat:
Create code using gethostbyname and getipnodebyaddr, call it for an
addres with multiple PTR records then compare results.
>Fix:
There are several ways to define the flag. I recommend the
following:
--- patch begins here ---
--- lib/libc/net/name6.c.ORIG Thu Oct 27 01:18:37 2005
+++ lib/libc/net/name6.c Thu Oct 27 01:20:27 2005
@@ -119,6 +119,7 @@
#include <stdarg.h>
#include <nsswitch.h>
#include <unistd.h>
+#include "res_config.h"
#include "un-namespace.h"
#include "netdb_private.h"
--- patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list