On Sun, Feb 02, 2014 at 03:12:36PM +0100, IMAP List Administration wrote:
> [I forgot to send this to the list]
>
> Hi Eric,
>
> On 02/01/2014 11:43 AM, Eric Faurot wrote:
> > The following diff fixes the problems with the example IPs you gave us.
> > - subsequent PTR records are now set as aliases in the hostent
> > - need to accept '/' in dname labels (maybe others?)
> Since the code differs, I'm guessing your patch is for -current.
>
> We're running -stable. Could you possibly supply a patch for that?
>
> cheers,
>
> Rob Urban
>
Hi,
This is the diff against -stable.
Eric.
Index: asr_utils.c
===================================================================
RCS file: /cvs/src/lib/libc/asr/asr_utils.c,v
retrieving revision 1.8
diff -u -p -r1.8 asr_utils.c
--- asr_utils.c 12 Jul 2013 14:36:21 -0000 1.8
+++ asr_utils.c 3 Feb 2014 09:44:29 -0000
@@ -55,7 +55,7 @@ dname_check_label(const char *s, size_t
return (-1);
for (l--; l; l--, s++)
- if (!(isalnum(*s) || *s == '_' || *s == '-'))
+ if (!(isalnum(*s) || *s == '_' || *s == '-' || *s == '/'))
return (-1);
return (0);
Index: gethostnamadr_async.c
===================================================================
RCS file: /cvs/src/lib/libc/asr/gethostnamadr_async.c,v
retrieving revision 1.22
diff -u -p -r1.22 gethostnamadr_async.c
--- gethostnamadr_async.c 17 Jul 2013 07:43:23 -0000 1.22
+++ gethostnamadr_async.c 3 Feb 2014 09:44:30 -0000
@@ -504,8 +504,7 @@ hostent_from_packet(int reqtype, int fam
if (strcasecmp(rr.rr_dname, dname) != 0)
continue;
if (hostent_set_cname(h, rr.rr.ptr.ptrname, 1) == -1)
- goto fail;
- /* XXX See if we need MULTI_PTRS_ARE_ALIASES */
+ hostent_add_alias(h, rr.rr.ptr.ptrname, 1);
break;
case T_A: