--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Hi team,
Please unblock package gdnsd, 2.4.2-1. It includes an important fix that
reverts the rejection of post-2018 GeoIP databases and restores an
important part of the package's functionality (auto_dc_coords), as well
as a printf formatting error fix.
Unfortunately, the upload includes a few other small but unrelated
changes (both upstream, behind an #ifdef __FreeBSD__, and in Debian
packaging). My intention was to upload this well before the freeze, but
unfortunately did not manage to until a couple days before :(
Hopefully they're small and easy to review and won't be a huge waste of
your precious time. Apologies on my end for this! I'd appreciate to not
have to go through s-p-u just to revert these tiny changes...
unblock gdnsd/2.4.2-1
Regards,
Faidon
diff --git a/NEWS b/NEWS
index 76e108f..152edad 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+2.4.2 - 2019-02-11
+ * FreeBSD: Fix EADDRNOTAVAIL issue for IPv6 sockets when the listening IP
+ is bound to the loopback and traffic is routed indirectly, by resetting
+ ifindex to zero for non-link-local IPv6 IPs in the cmsg structure passed
+ between recvmsg() and sendmsg().
+
+2.4.1 - 2019-01-10
+ * These two fixes are backports from master branch work towards 3.x:
+ * Reverted the detection and rejection of post-2018 GeoLite2-City databases
+ with auto_dc_coords that was added in 2.3.1, as MaxMind later reversed
+ course and decided to keep the coordinates in the databases.
+ * Bugfix for a bad printf() format specifier in the case that strerror()
+ failed on non-GNU platforms.
+
2.4.0 - 2018-02-15
* plugin_multifo: added "ignore_health" parameter. If "ignore_health" is
true, all addresses are added to the result set regardless of health, but
diff --git a/configure.ac b/configure.ac
index 48e01f9..3ce9ee8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.63])
-AC_INIT([gdnsd],[2.4.0],[https://github.com/gdnsd/gdnsd/issues])
+AC_INIT([gdnsd],[2.4.2],[https://github.com/gdnsd/gdnsd/issues])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_AUX_DIR([acaux])
AM_INIT_AUTOMAKE([1.11.1 dist-xz no-dist-gzip foreign tar-ustar subdir-objects -Wall])
diff --git a/debian/changelog b/debian/changelog
index f18427c..e4ec3c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+gdnsd (2.4.2-1) unstable; urgency=medium
+
+ * New upstream point release.
+ * Bump Standards-Version to 4.3.0, no changes needed.
+ * Build-Depend on debhelper 11~ to ease backports.
+ * Drop [linux-any] from liburcu-dev Build-Depends, as it's now available on
+ kFreeBSD.
+ * Add 2019 to debian/copyright years.
+ * Misc source package changes:
+ - Drop overlay/tarballs/build-area from gbp.conf.
+ - Remove custom compression setting from source/options.
+ - Sort Build-Depends.
+
+ -- Faidon Liambotis <paravoid@debian.org> Tue, 05 Mar 2019 16:37:21 +0200
+
gdnsd (2.4.0-1) unstable; urgency=medium
* New upstream release.
diff --git a/debian/control b/debian/control
index ffce03f..a54578d 100644
--- a/debian/control
+++ b/debian/control
@@ -2,15 +2,20 @@ Source: gdnsd
Section: net
Priority: optional
Maintainer: Faidon Liambotis <paravoid@debian.org>
-Build-Depends: debhelper (>= 11),
- libltdl-dev, perl,
- ragel, libev-dev,
- liburcu-dev [linux-any],
+Build-Depends:
+ debhelper (>= 11~),
+ ragel,
+ libev-dev,
+ libltdl-dev,
libmaxminddb-dev (>= 1.2.0),
libunwind-dev [i386 amd64 ppc64 ppc64el powerpc powerpcspe armel armhf arm64 mips mipsel mips64el],
- libsocket6-perl, libio-socket-inet6-perl,
- libwww-perl, libhttp-daemon-perl
-Standards-Version: 4.1.4
+ liburcu-dev,
+ perl,
+ libhttp-daemon-perl,
+ libio-socket-inet6-perl,
+ libsocket6-perl,
+ libwww-perl
+Standards-Version: 4.3.0
Homepage: http://gdnsd.org/
Vcs-Browser: https://github.com/paravoid/gdnsd
Vcs-Git: https://github.com/paravoid/gdnsd.git
diff --git a/debian/copyright b/debian/copyright
index 70f02cd..b2f9385 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -3,7 +3,7 @@ Upstream-Name: gdnsd
Source: https://github.com/gdnsd/gdnsd
Files: *
-Copyright: 2012-2013, Brandon L Black <blblack@gmail.com>
+Copyright: 2012-2019, Brandon L Black <blblack@gmail.com>
License: GPL-3+
Files: t/Net/*
@@ -23,7 +23,7 @@ License: Artistic or GPL-1+
"/usr/share/common-licenses/Artistic".
Files: debian/*
-Copyright: 2012-2018, Faidon Liambotis <paravoid@debian.org>
+Copyright: 2012-2019, Faidon Liambotis <paravoid@debian.org>
License: GPL-3+
License: GPL-3+
diff --git a/debian/gbp.conf b/debian/gbp.conf
index bedf34d..81b6d6d 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -2,9 +2,6 @@
upstream-tree=tag
debian-branch=debian
upstream-tag = v%(version)s
-overlay = True
no-create-orig = True
compression = xz
-tarball-dir = ../tarballs
-export-dir = ../build-area
prebuild = rm -f .travis.yml
diff --git a/debian/source/options b/debian/source/options
deleted file mode 100644
index b7bc1f2..0000000
--- a/debian/source/options
+++ /dev/null
@@ -1 +0,0 @@
-compression = "xz"
diff --git a/docs/gdnsd-plugin-geoip.podin b/docs/gdnsd-plugin-geoip.podin
index a35837e..a3e5592 100644
--- a/docs/gdnsd-plugin-geoip.podin
+++ b/docs/gdnsd-plugin-geoip.podin
@@ -428,19 +428,6 @@ C<auto_dc_coords>, those datacenters will not be used in automatic results,
but will still be available for manual use via C<map> and/or C<nets>
entries.
-Note that MaxMind will stop including coordinate data in their free
-GeoLite2-City databases in 2019, which makes them incompatible with this
-mode of operation. The code will attempt to detect such a condition and
-refuse to configure the map in this case. The commercial GeoIP2-City
-databases still contain coordinate information and can be used. MaxMind
-links on this topic:
-
-L<https://dev.maxmind.com/geoip/geoip2/geolite2/>
-
-L<https://support.maxmind.com/geolite-legacy-discontinuation-notice/>
-
-L<https://blog.maxmind.com/2018/01/02/discontinuation-of-the-geolite-legacy-databases/>
-
=item C<auto_dc_limit = N>
Unsigned integer, optional, default 3. When city-auto-mode is in effect,
diff --git a/libgdmaps/gdgeoip2.c b/libgdmaps/gdgeoip2.c
index 9d76bd3..c4af4a0 100644
--- a/libgdmaps/gdgeoip2.c
+++ b/libgdmaps/gdgeoip2.c
@@ -171,14 +171,7 @@ static geoip2_t* geoip2_new(const char* pathname, const char* map_name, dclists_
// Country defaulting if the database_type does not match /Country/.
db->is_city = !!strstr(meta->database_type, "City");
- if(db->is_city) {
- // 1546300799 == 2018-12-31T23:59:59
- if(city_auto_mode && strstr(meta->database_type, "GeoLite2") && meta->build_epoch > (uint64_t)1546300799LLU) {
- dmn_log_err("plugin_geoip: map '%s': GeoIP2 DB '%s' appears to be a post-2018 GeoLite2-City database, which will not work with auto_dc_coords as configured because these databases lack the latitude and longitude data present in the commercial version. See the auto_dc_coords section of the gdnsd-plugin-geoip documentation for more details.", map_name, pathname);
- geoip2_destroy(db);
- return NULL;
- }
- } else {
+ if(!db->is_city) {
if(city_auto_mode) {
dmn_log_err("plugin_geoip: map '%s': GeoIP2 DB '%s' is not a City-level"
" database and this map uses auto_dc_coords",
diff --git a/libgdnsd/dmn.c b/libgdnsd/dmn.c
index e3bf04d..a533cd7 100644
--- a/libgdnsd/dmn.c
+++ b/libgdnsd/dmn.c
@@ -293,7 +293,7 @@ const char* dmn_logf_strerror(const int errnum) {
if(rv == EINVAL || (rv < 0 && errno == EINVAL))
snprintf(tmpbuf, DMN_ERRNO_MAXLEN, "Invalid errno: %i", errnum);
else
- dmn_log_fatal("strerror_r(,,%zu) failed", DMN_ERRNO_MAXLEN);
+ dmn_log_fatal("strerror_r(,,%u) failed", DMN_ERRNO_MAXLEN);
}
tmpbuf_ptr = tmpbuf;
#endif
diff --git a/src/dnsio_udp.c b/src/dnsio_udp.c
index 933ca0b..e1431d7 100644
--- a/src/dnsio_udp.c
+++ b/src/dnsio_udp.c
@@ -296,13 +296,16 @@ static void mainloop(const int fd, void* dnsp_ctx, dnspacket_stats_t* stats, con
.iov_len = 0
};
struct msghdr msg_hdr;
- char cmsg_buf[cmsg_size];
- memset(cmsg_buf, 0, sizeof(cmsg_buf));
+ union {
+ char cbuf[CMSG_BUFSIZE];
+ struct cmsghdr align;
+ } cmsg_buf;
+ memset(cmsg_buf.cbuf, 0, sizeof(cmsg_buf.cbuf));
memset(&msg_hdr, 0, sizeof(struct msghdr));
msg_hdr.msg_name = &asin.sa;
msg_hdr.msg_iov = &iov;
msg_hdr.msg_iovlen = 1;
- msg_hdr.msg_control = use_cmsg ? cmsg_buf : NULL;
+ msg_hdr.msg_control = use_cmsg ? cmsg_buf.cbuf : NULL;
#if GDNSD_B_QSBR
const struct timeval tmout_short = { .tv_sec = 0, .tv_usec = PRCU_DELAY_US };
@@ -341,6 +344,21 @@ static void mainloop(const int fd, void* dnsp_ctx, dnspacket_stats_t* stats, con
recvmsg_rv = recvmsg(fd, &msg_hdr, 0);
#endif
+#if defined __FreeBSD__ && defined IPV6_PKTINFO
+ if(asin.sa.sa_family == AF_INET6) {
+ struct cmsghdr* cmsg;
+ for(cmsg = (struct cmsghdr *)CMSG_FIRSTHDR(&msg_hdr); cmsg;
+ cmsg = (struct cmsghdr *)CMSG_NXTHDR(&msg_hdr, cmsg)) {
+ if((cmsg->cmsg_level == IPPROTO_IPV6) && (cmsg->cmsg_type == IPV6_PKTINFO)) {
+ struct in6_pktinfo* pi = (void*)CMSG_DATA(cmsg);
+ if(!IN6_IS_ADDR_LINKLOCAL(&pi->ipi6_addr))
+ pi->ipi6_ifindex = 0;
+ continue;
+ }
+ }
+ }
+#endif
+
if(unlikely(
(asin.sa.sa_family == AF_INET && !asin.sin.sin_port)
|| (asin.sa.sa_family == AF_INET6 && !asin.sin6.sin6_port)
--- End Message ---