NetBSD Problem Report #56116
From www@netbsd.org Sun Apr 18 21:11:09 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 58FE01A921F
for <gnats-bugs@gnats.NetBSD.org>; Sun, 18 Apr 2021 21:11:09 +0000 (UTC)
Message-Id: <20210418211108.2A0DD1A923D@mollari.NetBSD.org>
Date: Sun, 18 Apr 2021 21:11:08 +0000 (UTC)
From: schaecsn@gmx.net
Reply-To: schaecsn@gmx.net
To: gnats-bugs@NetBSD.org
Subject: gethostbyname_r in net/GeoIP
X-Send-Pr-Version: www-1.0
>Number: 56116
>Category: pkg
>Synopsis: gethostbyname_r in net/GeoIP
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 18 21:15:00 +0000 2021
>Closed-Date: Mon Apr 26 19:02:16 +0000 2021
>Last-Modified: Tue Apr 27 14:40:01 +0000 2021
>Originator: Stefan Schaeckeler
>Release: pkgsrc-2021Q1
>Organization:
>Environment:
NetBSD xxx.xxx.xx 9.1_STABLE NetBSD 9.1_STABLE (GENERIC) #0: Tue Mar 2 18:31:12 PST 2021 root@dxxx.xxx.xx:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
Calling geoiplookup on ip addresses works. Calling geoiplookup on dns names core dumps.
GeoIP calls gethostbyname_r and returns a bogus address:
1824 phe = gethostbyname_r(host, &phe2, buf, buflength, &herr);
(gdb)
1840 if (!phe || result != 0) {
(gdb) p phe
$13 = (struct hostent *) 0xfffffffffff46010
See bug report #51477 for broader context. Isn't it time to properly address #51477?
>How-To-Repeat:
>Fix:
/usr/pkgsrc/net/GeoIP# cvs diff
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/GeoIP/Makefile,v
retrieving revision 1.32
diff -u -p -r1.32 Makefile
--- Makefile 8 Jan 2020 11:59:43 -0000 1.32
+++ Makefile 18 Apr 2021 20:59:08 -0000
@@ -16,5 +16,7 @@ GNU_CONFIGURE= yes
TEST_TARGET= check
+CONFIGURE_ARGS.NetBSD+= ac_cv_func_gethostbyname_r=no
+
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
>Release-Note:
>Audit-Trail:
From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56116 CVS commit: pkgsrc/net/GeoIP
Date: Mon, 19 Apr 2021 07:22:30 +0000
Module Name: pkgsrc
Committed By: maya
Date: Mon Apr 19 07:22:30 UTC 2021
Modified Files:
pkgsrc/net/GeoIP: Makefile
Log Message:
GeoIP: force-fail gethostbyname_r configure check.
NetBSD has this not-like-linux libc symbol and tries to hide it, but not
well enough that autoconf fails to find it.
Bump PKGREVISION for binary change.
From Stefan Schaeckeler in PR pkg/56116
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 pkgsrc/net/GeoIP/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Christos Zoulas <christos@zoulas.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org,
gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org,
schaecsn@gmx.net
Subject: Re: PR/56116 CVS commit: pkgsrc/net/GeoIP
Date: Mon, 19 Apr 2021 07:44:13 -0400
--Apple-Mail=_679CA615-DC85-49FE-AABA-903F2C64290C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
This package is EOL'ed. Otherwise, we could fix it using getaddrinfo =
like the ipv6 function does which is a lot simpler.
christos
--Apple-Mail=_679CA615-DC85-49FE-AABA-903F2C64290C
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
iF0EARECAB0WIQS+BJlbqPkO0MDBdsRxESqxbLM7OgUCYH1tDQAKCRBxESqxbLM7
OjFPAJ9LLGfU+i7X8kDAj2psS2cMu0BTSgCfdyIiZT0E010Xo9Asji1pwRq+Lp0=
=F2P9
-----END PGP SIGNATURE-----
--Apple-Mail=_679CA615-DC85-49FE-AABA-903F2C64290C--
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 26 Apr 2021 19:02:16 +0000
State-Changed-Why:
Applied (will request pullup)
From: "Benny Siegert" <bsiegert@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56116 CVS commit: [pkgsrc-2021Q1] pkgsrc/net/GeoIP
Date: Tue, 27 Apr 2021 14:35:55 +0000
Module Name: pkgsrc
Committed By: bsiegert
Date: Tue Apr 27 14:35:55 UTC 2021
Modified Files:
pkgsrc/net/GeoIP [pkgsrc-2021Q1]: Makefile
Log Message:
Pullup ticket #6451 - requested by maya
net/GeoIP: NetBSD build fix
Revisions pulled up:
- net/GeoIP/Makefile 1.33
---
Module Name: pkgsrc
Committed By: maya
Date: Mon Apr 19 07:22:30 UTC 2021
Modified Files:
pkgsrc/net/GeoIP: Makefile
Log Message:
GeoIP: force-fail gethostbyname_r configure check.
NetBSD has this not-like-linux libc symbol and tries to hide it, but not
well enough that autoconf fails to find it.
Bump PKGREVISION for binary change.
>From Stefan Schaeckeler in PR pkg/56116
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.32.10.1 pkgsrc/net/GeoIP/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.