From owner-freebsd-stable Wed Feb 28 5:24:53 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mta04.mail.mel.aone.net.au (mta04.mail.au.uu.net [203.2.192.84]) by hub.freebsd.org (Postfix) with ESMTP id 5D9DB37B718; Wed, 28 Feb 2001 05:24:39 -0800 (PST) (envelope-from thyerm@camtech.net.au) Received: from camtech.net.au ([203.55.241.53]) by mta04.mail.mel.aone.net.au with ESMTP id <20010228132436.XNSI17033.mta04.mail.mel.aone.net.au@camtech.net.au>; Thu, 1 Mar 2001 00:24:36 +1100 Message-ID: <3A9CFCF0.C24ADB1@camtech.net.au> Date: Wed, 28 Feb 2001 23:58:16 +1030 From: Matthew Thyer X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: John Hay Cc: current@FreeBSD.org, stable@FreeBSD.org Subject: Re: resolver problem with shared linked programs References: <200102281125.f1SBPiM51551@zibbi.icomtek.csir.co.za> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John Hay wrote: > > I noticed that sendmail started to complain of a failed reverse lookup > when starting: > > Feb 28 11:40:43 beast sendmail[276]: gethostbyaddr(3ffe:2900:fffa:2:2a0:c9ff:fe8d:7c5f) failed: 2 > > At first I thought something is wrong with my ipv6 dns setup, but it turned > out that if a program is linked shared the first getipnodebyaddr() it does > will succeed, but the rest fail. For a staticly linked program all of > them will succeed: So it's in -CURRENT too. -STABLE users have been complaining of a similar problem since about the 20th/21st of Feb. I was damned lucky that I skimmed: http://www.mail-archive.com/freebsd-stable%40freebsd.org/ before I built a -STABLE system today. I'm cross posting to stable so others can try your program. And I wont install my -CURRENT buildworld. > > #include > #include > #include > #include > #include > #include > > int main(int argc, char **argv) > { > struct hostent *he; > int h_err; > u_char ipnum[16]; > char *astr1; > > astr1 = "146.64.24.3"; > h_err = inet_pton(AF_INET, astr1, ipnum); > if(h_err == 0) { > printf("conversion error with inet_pton()\n"); > exit(1); > } > > he = getipnodebyaddr(ipnum, 4, AF_INET, &h_err); > if(he == NULL) { > printf("Oops: %d.\n", h_err); > herror("getipnodebyaddr"); > } else > printf("And the answer is: %s\n", he->h_name); > > he = getipnodebyaddr(ipnum, 4, AF_INET, &h_err); > if(he == NULL) { > printf("Oops: %d.\n", h_err); > herror("getipnodebyaddr"); > } else > printf("And the answer is: %s\n", he->h_name); > > return 0; > } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message