From owner-freebsd-net Thu Aug 10 20:57:21 2000 Delivered-To: freebsd-net@freebsd.org Received: from obie.softweyr.com (obie.softweyr.com [204.68.178.33]) by hub.freebsd.org (Postfix) with ESMTP id EEA6237B6ED; Thu, 10 Aug 2000 20:57:15 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from softweyr.com (Foolstrustident!@homer.softweyr.com [204.68.178.39]) by obie.softweyr.com (8.8.8/8.8.8) with ESMTP id VAA07160; Thu, 10 Aug 2000 21:57:12 -0600 (MDT) (envelope-from wes@softweyr.com) Message-ID: <39937AED.7A9DCAE@softweyr.com> Date: Thu, 10 Aug 2000 22:02:53 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.1-RC i386) X-Accept-Language: en MIME-Version: 1.0 To: Greg Thompson Cc: freebsd-hackers@FreeBSD.ORG, freebsd-net@FreeBSD.ORG Subject: Re: threadsafe name resolution References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Greg Thompson wrote: > > i've just received confirmation from the author of the KAME resolution code > that it isn't at all thread safe: > > >Sure. As noted in name6.c, thread related stuff is not implemented yet. > >Since our resolver code based on bind4 doesn't aware thread safeness, > >all I can do now would be only putting mutex, anyway. > > sure enough, name6.c says: > > /* > * TODO for thread safe > * use mutex for _hostconf, _hostconf_init. > * rewrite resolvers to be thread safe > */ > > now, i'd say that it's fairly important for some form of threadsafe name > resolution to exist. until the KAME code is fixed, how about adding in the > ipv4 _r methods that have been discussed from time to time? or, at the very > least, put something in the manpage for getipnodebyname and friends > indicating that the funcs are not threadsafe. > > as you can probably tell, i wasted several hours worth of work bumping into > this problem. I've been working on fleshing out the _r routines for quite some time now. I've done all the easy ones, and the ones you're looking for are just screaming butt-ugly. It would be simple enough to create a mutex-protected variant of each, but that's not nearly as good a solution as make a REAL _r implementation. If you have implementations to offer, I'd be quite happy to review and commit them. I haven't had enough spare time to even crack the code in months now, unfortunately. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message