Hi, In freeradius-client gethostby* is wrapped in order to be thread-safe. But imho it's done in wrong way causing gethostby* to malfunction. In lib/ip_util.c: _______________________________________________ size_t hostbuflen; char *tmphostbuf; int res; int herr; hostbuflen = 1024; tmphostbuf = malloc(hostbuflen); #endif #endif #ifdef GETHOSTBYNAME_R #if defined (GETHOSTBYNAMERSTYLE_GNU) while ((res = gethostbyname_r(hostname, &hostbuf, tmphostbuf, hostbuflen, &hp, &herr)) == ERANGE) { /* Enlarge the buffer */ hostbuflen *= 2; tmphostbuf = realloc(tmphostbuf, hostbuflen); } free(tmphostbuf); _______________________________________________ Afaik if tmphostbuf is freed the data is gone. The easiest way to fix it which I can think of is thread local storage (TLS), please see the patch. -- Best Regards, Alex Massover VoIP R&D TL Jajah Inc. This mail was sent via Mail-SeCure System.