Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package adns for openSUSE:Factory checked in 
at 2026-09-19 22:20:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/adns (Old)
 and      /work/SRC/openSUSE:Factory/.adns.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "adns"

Sat Sep 19 22:20:16 2026 rev:34 rq:1378853 version:1.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/adns/adns.changes        2026-05-07 
15:46:22.158548090 +0200
+++ /work/SRC/openSUSE:Factory/.adns.new.383539/adns.changes    2026-09-19 
22:21:16.996956698 +0200
@@ -1,0 +2,12 @@
+Wed Sep 16 18:35:50 UTC 2026 - Antonio Teixeira <[email protected]>
+
+- Update to 1.7.0:
+  * Select query IDs randomly using getentropy, if we can.
+    See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1145407.
+  * Test harness: minor tidying up re input file reading.
+  * README: Ask for bugs to go to Debian.
+- Refresh patches
+  * adns-1.4-configure.patch
+  * adns-visibility.patch
+
+-------------------------------------------------------------------

Old:
----
  adns-1.6.2.tar.gz
  adns-1.6.2.tar.gz.sig

New:
----
  adns-1.7.0.tar.gz
  adns-1.7.0.tar.gz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ adns.spec ++++++
--- /var/tmp/diff_new_pack.PlXKye/_old  2026-09-19 22:21:18.426016305 +0200
+++ /var/tmp/diff_new_pack.PlXKye/_new  2026-09-19 22:21:18.430016472 +0200
@@ -19,7 +19,7 @@
 
 %define lname  libadns1
 Name:           adns
-Version:        1.6.2
+Version:        1.7.0
 Release:        0
 Summary:        Advanced Easy-to-Use Asynchronous-Capable DNS Utilities
 License:        GPL-2.0-or-later
@@ -59,7 +59,7 @@
 programs with libads support.
 
 %prep
-%autosetup -p0
+%autosetup -p1
 cp %{SOURCE3} .
 
 %build

++++++ adns-1.4-configure.patch ++++++
--- /var/tmp/diff_new_pack.PlXKye/_old  2026-09-19 22:21:18.538020977 +0200
+++ /var/tmp/diff_new_pack.PlXKye/_new  2026-09-19 22:21:18.551021519 +0200
@@ -1,6 +1,8 @@
---- configure.in
-+++ configure.in       2006/09/01 12:30:00
-@@ -23,8 +23,7 @@
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -19,8 +19,7 @@
  AC_INIT(src/adns.h)
  AC_CONFIG_HEADER(src/config.h)
  
@@ -10,7 +12,7 @@
   AC_MSG_CHECKING($1)
   AC_CACHE_VAL($2,[
    AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
-@@ -65,6 +64,116 @@
+@@ -61,6 +60,116 @@ AC_PROG_CPP
  AC_PROG_RANLIB
  AC_PROG_INSTALL
  
@@ -124,7 +126,7 @@
 +#endif
 +])
 +
- AC_CHECK_FUNCS(poll)
+ AC_CHECK_FUNCS(poll getentropy)
  ADNS_C_GETFUNC(socket,socket)
  ADNS_C_GETFUNC(inet_ntoa,nsl)
 

++++++ adns-1.6.2.tar.gz -> adns-1.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/INSTALL new/adns-1.7.0/INSTALL
--- old/adns-1.6.2/INSTALL      2026-05-05 19:23:23.000000000 +0200
+++ new/adns-1.7.0/INSTALL      2026-09-11 14:36:47.000000000 +0200
@@ -81,12 +81,12 @@
 which appear to come from your real nameservers.  It relies on the
 full-service resolvers listed in resolv.conf to handle these tasks.
 
-For secure and reasonable operation you MUST run a full-service
+For secure and reasonable operation you should run a full-service
 nameserver on the same system as your adns applications, or on the
-same local, fully trusted network.  You MUST only list such
+same local, fully trusted network.  You should only list such
 nameservers in the adns configuration (eg resolv.conf).
 
-You MUST use a firewall or other means to block packets which appear
+You should use a firewall or other means to block packets which appear
 to come from these nameservers, but which were actually sent by other,
 untrusted, entities.
 
@@ -94,6 +94,11 @@
 understand even how to ask a DNSSEC-aware nameserver to perform the
 DNSSEC cryptographic signature checking.
 
+adns does use random query ids, since 1.7.0.  (In the unlikely event
+this is not possible, adns will log a message to stderr.)
+The position is similar to other stub resolvers, such as the one in
+glibc used by gethostbyname etc.
+
 
 COPYRIGHT
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/Makefile.in new/adns-1.7.0/Makefile.in
--- old/adns-1.6.2/Makefile.in  2026-05-05 19:23:23.000000000 +0200
+++ new/adns-1.7.0/Makefile.in  2026-09-11 14:36:47.000000000 +0200
@@ -20,7 +20,7 @@
 
 # Remember to change ADNS_VERSION_STRING in client/client.h too, and
 # possibly library soname (MAJOR and MINOR in common.make.in).
-DISTVERSION=   1.6.2
+DISTVERSION=   1.7.0
 
 srcdir=                @srcdir@
 VPATH=         @srcdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/README new/adns-1.7.0/README
--- old/adns-1.6.2/README       2026-05-05 19:23:23.000000000 +0200
+++ new/adns-1.7.0/README       2026-09-11 14:36:47.000000000 +0200
@@ -1,4 +1,4 @@
-                                    GNU adns
+                                      adns
 
    Advanced, easy to use, asynchronous-capable DNS client library and
    utilities.
@@ -66,12 +66,12 @@
    I'd be pleased if you would let me know if you're using my library in
    your project, and what you think of it.
 
-   Bug reports should be reported to the [3]GNU Debbugs. Send an email to
-   [email protected] and at the top of your email, in a paragraph of
-   its own, write the single line
+   Bug reports should be reported to the [3]Debian Bug Tracking System.
+   Send an email to [email protected] and at the top of your email,
+   in a paragraph of its own, write the single line
 Package: adns
 
-   Your bug report will be published via to the adns-discuss list.
+   Your bug report will be published.
 
    Feedback and discussion takes place on the adns-discuss list. You can
    mail me privately at [email protected].
@@ -137,16 +137,16 @@
 
    Ian Jackson / [email protected].
 
-   [15]GNU home page; [16]chiark home page; [17]site or mirror home page
+   [15]chiark home page; [16]site or mirror home page
 
    This web page is Copyright Ian Jackson. See the
-   [18]Copyright/acknowledgements.
+   [17]Copyright/acknowledgements.
 
 References
 
    1. https://www.chiark.greenend.org.uk/~ian/adns/docs/adnshost.txt
    2. https://www.chiark.greenend.org.uk/~ian/adns/docs/adns.h.txt
-   3. https://debbugs.gnu.org/
+   3. https://bugs.debian.org/
    4. https://www.chiark.greenend.org.uk/mailman/listinfo
    5. https://www.chiark.greenend.org.uk/~ian/adns/docs/adns.h.txt
    6. https://www.chiark.greenend.org.uk/~ian/adns/docs/adnshost.txt
@@ -158,7 +158,6 @@
   12. https://adns.jgaa.com/
   13. https://www.chiark.greenend.org.uk/~ian/adns/docs/COPYING.txt
   14. https://www.fsf.org/
-  15. https://www.gnu.org/
-  16. https://www.chiark.greenend.org.uk/
-  17. file:///
-  18. https://www.chiark.greenend.org.uk/~ian/sw-www-copy.html
+  15. https://www.chiark.greenend.org.uk/
+  16. file:///
+  17. https://www.chiark.greenend.org.uk/~ian/sw-www-copy.html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/README.html new/adns-1.7.0/README.html
--- old/adns-1.6.2/README.html  2026-05-05 19:23:23.000000000 +0200
+++ new/adns-1.7.0/README.html  2026-09-11 14:36:47.000000000 +0200
@@ -3,7 +3,7 @@
 <meta name="keywords" content="adns">
 </head>
 <body>
-<h1>GNU adns</h1>
+<h1>adns</h1>
 
 <strong>Advanced, easy to use, asynchronous-capable DNS client
 library and utilities.</strong>
@@ -108,13 +108,14 @@
 <p>
 
 Bug reports should be reported to the
-<a href="https://debbugs.gnu.org/";>GNU Debbugs</a>.  Send an email
-to <code>[email protected]</code> and at the top of your email,
+<a href="https://bugs.debian.org/";>Debian Bug Tracking System</a>.
+Send an email
+to <code>[email protected]</code> and at the top of your email,
 in a paragraph of its own, write the single line
 <pre>
 Package: adns
 </pre>
-Your bug report will be published via to the adns-discuss list.
+Your bug report will be published.
 
 <p>
 
@@ -222,7 +223,6 @@
 Ian Jackson / <tt>[email protected]</tt>.
 <p>
 
-<A href="https://www.gnu.org/";>GNU home page</A>;
 <A href="https://www.chiark.greenend.org.uk/";>chiark home page</A>;
 <A href="/">site or mirror home page</A>
 <p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/changelog new/adns-1.7.0/changelog
--- old/adns-1.6.2/changelog    2026-05-05 19:25:45.000000000 +0200
+++ new/adns-1.7.0/changelog    2026-09-11 14:36:47.000000000 +0200
@@ -1,3 +1,13 @@
+adns (1.7.0) UPSTREAM; urgency=medium
+
+  * Select query IDs randomly using getentropy, if we can.
+    See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1145407.
+  * Test harness: minor tidying up re input file reading.
+  * README: Ask for bugs to go to Debian.
+  * This changelog: Remove obsolete Emacs local variables section.
+
+ -- Ian Jackson <[email protected]>  Fri, 11 Sep 2026 13:35:34 
+0100
+
 adns (1.6.2) UPSTREAM; urgency=low
 
   Minor bugfix:
@@ -583,8 +593,3 @@
   * Initial public alpha release.
 
  -- Ian Jackson <[email protected]>  Sat, 17 April 1999 17:42:19
-
-Local variables:
-mode: debian-changelog
-fill-column: 75
-End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/client/client.h 
new/adns-1.7.0/client/client.h
--- old/adns-1.6.2/client/client.h      2026-05-05 19:23:23.000000000 +0200
+++ new/adns-1.7.0/client/client.h      2026-09-11 14:36:47.000000000 +0200
@@ -23,7 +23,7 @@
 #ifndef CLIENT_H_INCLUDED
 #define CLIENT_H_INCLUDED
 
-#define ADNS_VERSION_STRING "1.6.2"
+#define ADNS_VERSION_STRING "1.7.0"
 
 #define COPYRIGHT_MESSAGE \
  "Copyright Ian Jackson and contributors\n" \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/common.make.in 
new/adns-1.7.0/common.make.in
--- old/adns-1.6.2/common.make.in       2024-05-05 23:28:40.000000000 +0200
+++ new/adns-1.7.0/common.make.in       2026-09-11 14:36:47.000000000 +0200
@@ -18,7 +18,7 @@
 #  along with this program; if not, write to the Free Software Foundation.
 
 MAJOR=         1
-MINOR=         6
+MINOR=         7
 SHLIBFILE=     @SHLIBFILE@
 SHLIBSONAME=   @SHLIBSONAME@
 SHLIBFORLINK=  @SHLIBFORLINK@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/configure new/adns-1.7.0/configure
--- old/adns-1.6.2/configure    2026-05-05 19:23:23.000000000 +0200
+++ new/adns-1.7.0/configure    2026-09-11 14:36:47.000000000 +0200
@@ -3858,6 +3858,12 @@
   printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
 
 fi
+ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
+if test "x$ac_cv_func_getentropy" = xyes
+then :
+  printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
+
+fi
 
 
  ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/configure.in new/adns-1.7.0/configure.in
--- old/adns-1.6.2/configure.in 2024-05-05 23:28:40.000000000 +0200
+++ new/adns-1.7.0/configure.in 2026-09-11 14:36:47.000000000 +0200
@@ -61,7 +61,7 @@
 AC_PROG_RANLIB
 AC_PROG_INSTALL
 
-AC_CHECK_FUNCS(poll)
+AC_CHECK_FUNCS(poll getentropy)
 ADNS_C_GETFUNC(socket,socket)
 ADNS_C_GETFUNC(inet_ntoa,nsl)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/regress/hcommon.c.m4 
new/adns-1.7.0/regress/hcommon.c.m4
--- old/adns-1.6.2/regress/hcommon.c.m4 2024-05-05 23:31:14.000000000 +0200
+++ new/adns-1.7.0/regress/hcommon.c.m4 2026-09-11 14:36:47.000000000 +0200
@@ -275,6 +275,11 @@
   return 2264; /* just some number */
 }
 
+pid_t Hgetentropy(void *buffer, size_t length) {
+  errno= ENOSYS;
+  return -1;
+}
+
 void Tcommonshutdown(void) {
   Tshutdown();
   adns__vbuf_free(&vb);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/regress/hplayback.c.m4 
new/adns-1.7.0/regress/hplayback.c.m4
--- old/adns-1.6.2/regress/hplayback.c.m4       2024-05-05 23:31:13.000000000 
+0200
+++ new/adns-1.7.0/regress/hplayback.c.m4       2026-09-11 14:36:47.000000000 
+0200
@@ -92,6 +92,12 @@
   if (feof(Tinputfile)) Psyntax("eof at syscall reply");
 }
 
+
+static void Pfgets(void *buf, int size) {
+  (void)fgets(buf,size,Tinputfile);
+  Pcheckinput();
+}
+
 void T_gettimeofday_hook(void) {
   static struct timeval previously;
   struct timeval delta;
@@ -118,7 +124,7 @@
   setvbuf(Tinputfile,0,_IONBF,0);
 
   if (!adns__vbuf_ensure(&vb2,1000)) Tnomem();
-  fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput();
+  Pfgets(vb2.buf,vb2.avail);
   chars= -1;
   sscanf(vb2.buf," start %lu.%lu%n",&sec,&usec,&chars);
   if (chars==-1) Psyntax("start time invalid");
@@ -170,7 +176,7 @@
   long usec;
 
   if (!adns__vbuf_ensure(&vb2,1000)) Tnomem();
-  fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput();
+  Pfgets(vb2.buf,vb2.avail);
   chars= -1;
   sscanf(vb2.buf," +%lu.%ld%n",&sec,&usec,&chars);
   if (chars==-1) Psyntax("update time invalid");
@@ -348,7 +354,7 @@
 
   Tensuresetup();
   if (!adns__vbuf_ensure(&vb2,vb.used+2)) Tnomem();
-  fread(vb2.buf,1,vb.used+2,Tinputfile);
+  (void)fread(vb2.buf,1,vb.used+2,Tinputfile);
   if (feof(Tinputfile)) {
     fprintf(stderr,"adns test harness: input ends prematurely; program did:\n 
%.*s\n",
            vb.used,vb.buf);
@@ -388,7 +394,7 @@
 
  m4_define(`hm_r_offset',`m4_len(` $1=')')
  if (!adns__vbuf_ensure(&vb2,1000)) Tnomem();
- fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput();
+ Pfgets(vb2.buf,vb2.avail);
 
  Tensuresetup();
  fprintf(Treportfile,"%s",vb2.buf);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/regress/hsyscalls.i4 
new/adns-1.7.0/regress/hsyscalls.i4
--- old/adns-1.6.2/regress/hsyscalls.i4 2024-05-05 23:31:45.000000000 +0200
+++ new/adns-1.7.0/regress/hsyscalls.i4 2026-09-11 14:36:47.000000000 +0200
@@ -131,6 +131,7 @@
 hm_specsyscall(int, gettimeofday, `struct timeval *tv, struct timezone *tz')
 hm_specsyscall(int, clock_gettime, `clockid_t clk, struct timespec *ts')
 hm_specsyscall(pid_t, getpid, `void')
+hm_specsyscall(int, getentropy, `void *buffer, size_t length')
 hm_specsyscall(int, close, `int fd')
 
 m4_define(hm_stdsyscall_close,`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/regress/m1test 
new/adns-1.7.0/regress/m1test
--- old/adns-1.6.2/regress/m1test       2024-05-05 23:29:06.000000000 +0200
+++ new/adns-1.7.0/regress/m1test       2026-09-11 14:36:47.000000000 +0200
@@ -62,6 +62,9 @@
 queryargs="$*"
 
 initstring="`cat $srcdir/init-$initfile.text`"
+initstring="$initstring
+options adns_qid_predictable_ok
+"
 xinitflagsf=$srcdir/$program-xinitflags.text
 if test -e $xinitflagsf
 then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/regress/shlib new/adns-1.7.0/regress/shlib
--- old/adns-1.6.2/regress/shlib        2024-05-05 23:15:01.000000000 +0200
+++ new/adns-1.7.0/regress/shlib        2026-09-11 14:36:47.000000000 +0200
@@ -16,6 +16,9 @@
        read <&4 queryargs
 
        initstring="`cat $srcdir/init-$initfile.text`"
+        initstring="$initstring
+options adns_qid_predictable_ok
+"
        xinitflagsf=$srcdir/$program-xinitflags.text
        if test -e $xinitflagsf
        then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/src/adns.h new/adns-1.7.0/src/adns.h
--- old/adns-1.6.2/src/adns.h   2026-05-05 19:23:23.000000000 +0200
+++ new/adns-1.7.0/src/adns.h   2026-09-11 14:36:47.000000000 +0200
@@ -600,6 +600,10 @@
  *   control the relative order of addresses in answers.  This option
  *   overrides the corresponding init flags (covered by adns_if_afmask).
  *
+ *  adns_qid_predictable_ok
+ *   Do not print an error message to stderr if we cannot use getentropy()
+ *   to generate random query-ids.  In this case, 
+ *
  *  adns_ignoreunkcfg
  *   Ignore unknown options and configuration directives, rather than
  *   logging them.  To be effective, appear in the configuration
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/src/adns.make new/adns-1.7.0/src/adns.make
--- old/adns-1.6.2/src/adns.make        2024-05-05 23:29:05.000000000 +0200
+++ new/adns-1.7.0/src/adns.make        2026-09-11 14:36:47.000000000 +0200
@@ -17,4 +17,4 @@
 #  along with this program; if not, write to the Free Software Foundation.
 
 LIBOBJS=       types.o event.o query.o reply.o general.o setup.o transmit.o \
-               parse.o poll.o check.o addrfam.o
+               parse.o poll.o check.o addrfam.o nextid.o
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/src/config.h.in 
new/adns-1.7.0/src/config.h.in
--- old/adns-1.6.2/src/config.h.in      2026-05-05 19:23:23.000000000 +0200
+++ new/adns-1.7.0/src/config.h.in      2026-09-11 14:36:47.000000000 +0200
@@ -40,6 +40,9 @@
 #undef HAVEUSE_RPCTYPES_H
 
 
+/* Define to 1 if you have the 'getentropy' function. */
+#undef HAVE_GETENTROPY
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/src/internal.h 
new/adns-1.7.0/src/internal.h
--- old/adns-1.6.2/src/internal.h       2024-05-05 23:24:45.000000000 +0200
+++ new/adns-1.7.0/src/internal.h       2026-09-11 14:36:47.000000000 +0200
@@ -362,6 +362,19 @@
 
 #define MAXUDP 2
 
+struct nextid_state {
+  unsigned fallback;
+
+#ifdef HAVE_GETENTROPY
+#define NEXTID_RANDOM_BUF_COUNT 64
+  uint16_t buf[NEXTID_RANDOM_BUF_COUNT];
+  int full;
+#endif /* HAVE_GETENTROPY */
+};
+
+extern void adns__nextid_init(struct nextid_state *nextid);
+extern int adns__nextid_nextid(adns_state ads);
+
 struct adns__state {
   adns_initflags iflags;
   adns_logcallbackfn *logfn;
@@ -369,7 +382,7 @@
   int configerrno;
   struct query_queue udpw, tcpw, childw, output, intdone;
   adns_query forallnext;
-  unsigned nextid;
+  struct nextid_state nextid;
   int tcpsocket;
   struct udpsocket { int af; int fd; } udpsockets[MAXUDP];
   int nudpsockets;
@@ -394,6 +407,7 @@
   } sortlist[MAXSORTLIST];
   char **searchlist;
   unsigned config_report_unknown:1;
+  unsigned nextid_report_fallback:1;
   unsigned short rand48xsubi[3];
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/src/nextid.c new/adns-1.7.0/src/nextid.c
--- old/adns-1.6.2/src/nextid.c 1970-01-01 01:00:00.000000000 +0100
+++ new/adns-1.7.0/src/nextid.c 2026-09-11 14:36:47.000000000 +0200
@@ -0,0 +1,93 @@
+/*
+ * nextid.c
+ * - obtain query ids (platform-dependent)
+ */
+/*
+ *  This file is part of adns, which is Copyright Ian Jackson
+ *  and contributors (see the file INSTALL for full details).
+ *  
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3, or (at your option)
+ *  any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software Foundation.
+ */
+
+#include "internal.h"
+
+/* common, error handling */
+
+static void good_failure(adns_state ads, const char *fmt, ...)
+  PRINTFFORMAT(2,3);
+
+static void good_failure(adns_state ads, const char *fmt, ...) {
+  va_list al;
+
+  if (!ads->nextid_report_fallback) return;
+  ads->nextid_report_fallback= 0;
+
+  va_start(al,fmt);
+  adns__vdiag(ads,
+             " warning (suppress with 'options adns_qid_predictable_ok')",
+             adns_if_noerrprint, -1,0, fmt, al);
+  va_end(al);
+}
+
+#ifdef HAVE_GETENTROPY
+
+/* use getentropy */
+
+static void good_init(struct nextid_state *state) {
+  state->full = 0;
+}
+
+static int32_t good_nextid(adns_state ads) {
+  int r;
+
+  if (!ads->nextid.full) {
+    r= getentropy(ads->nextid.buf, sizeof(ads->nextid.buf));
+    if (r) {
+      good_failure(ads, "getentropy() failed: %s", strerror(errno));
+      return -1;
+    }
+    ads->nextid.full= NEXTID_RANDOM_BUF_COUNT;
+  }
+
+  return ads->nextid.buf[--ads->nextid.full];
+}
+
+#else /* ! HAVE_GETENTROPY */
+
+/* stubs */
+
+static void good_init(struct nextid_state *state) { }
+
+static int32_t good_nextid(adns_state ads) {
+  good_failure(ads, "getentropy() not available on this operating system");
+  return -1;
+}
+
+#endif /* ! HAVE_GETENTROPY */
+
+/* entrypoints */
+
+void adns__nextid_init(struct nextid_state *state) {
+  good_init(state);
+  state->fallback= 0x311f;
+}
+
+int adns__nextid_nextid(adns_state ads) {
+  int r= good_nextid(ads);
+  if (r >= 0) return r;
+
+  return (ads->nextid.fallback++) & 0x0ffff;
+}
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/src/setup.c new/adns-1.7.0/src/setup.c
--- old/adns-1.6.2/src/setup.c  2024-05-05 23:24:44.000000000 +0200
+++ new/adns-1.7.0/src/setup.c  2026-09-11 14:36:47.000000000 +0200
@@ -335,6 +335,10 @@
       ads->config_report_unknown=0;
       continue;
     }
+    if (WORD_IS("adns_qid_predictable_ok")) {
+      ads->nextid_report_fallback= 0;
+      continue;
+    }
     if (/* adns's query strategy is not configurable */
        WORD_STARTS("timeout:") ||
        WORD_STARTS("attempts:") ||
@@ -627,7 +631,7 @@
   LIST_INIT(ads->output);
   LIST_INIT(ads->intdone);
   ads->forallnext= 0;
-  ads->nextid= 0x311f;
+  adns__nextid_init(&ads->nextid);
   ads->nudpsockets= 0;
   ads->tcpsocket= -1;
   adns__vbuf_init(&ads->tcpsend);
@@ -639,6 +643,7 @@
   timerclear(&ads->tcptimeout);
   ads->searchlist= 0;
   ads->config_report_unknown=1;
+  ads->nextid_report_fallback=1;
 
   pid= getpid();
   ads->rand48xsubi[0]= pid;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/adns-1.6.2/src/transmit.c 
new/adns-1.7.0/src/transmit.c
--- old/adns-1.6.2/src/transmit.c       2024-05-05 23:24:44.000000000 +0200
+++ new/adns-1.7.0/src/transmit.c       2026-09-11 14:36:47.000000000 +0200
@@ -44,7 +44,7 @@
   vb->used= 0;
   MKQUERY_START(vb);
   
-  *id_r= id= (ads->nextid++) & 0x0ffff;
+  *id_r= id= adns__nextid_nextid(ads);
   MKQUERY_ADDW(id);
   MKQUERY_ADDB(0x01); /* QR=Q(0), OPCODE=QUERY(0000), !AA, !TC, RD */
   MKQUERY_ADDB(0x00); /* !RA, Z=000, RCODE=NOERROR(0000) */

++++++ adns-visibility.patch ++++++
--- /var/tmp/diff_new_pack.PlXKye/_old  2026-09-19 22:21:18.955038371 +0200
+++ /var/tmp/diff_new_pack.PlXKye/_new  2026-09-19 22:21:18.962038663 +0200
@@ -1,8 +1,8 @@
-Index: configure.in
+Index: b/configure.in
 ===================================================================
---- configure.in.orig
-+++ configure.in
-@@ -59,7 +59,9 @@ AC_ARG_ENABLE(dynamic,
+--- a/configure.in
++++ b/configure.in
+@@ -55,7 +55,9 @@ AC_ARG_ENABLE(dynamic,
                AC_MSG_RESULT([yes, by default])
  ])
  
@@ -13,11 +13,11 @@
  AC_PROG_CPP
  AC_PROG_RANLIB
  AC_PROG_INSTALL
-Index: src/internal.h
+Index: b/src/internal.h
 ===================================================================
---- src/internal.h.orig
-+++ src/internal.h
-@@ -51,6 +51,7 @@ typedef unsigned char byte;
+--- a/src/internal.h
++++ b/src/internal.h
+@@ -47,6 +47,7 @@ typedef unsigned char byte;
  # include "hredirect.h"
  #endif
  
@@ -25,7 +25,7 @@
  /* Configuration and constants */
  
  #define MAXSERVERS 5 /* do not increase beyond no. of bits in `unsigned'! */
-@@ -960,4 +961,5 @@ static inline int errno_resources(int e)
+@@ -970,4 +971,5 @@ static inline int errno_resources(int e)
                       (tv)|=GETIL_B(cb),               \
                       (tv) )
  

Reply via email to