about summary refs log tree commit diff
path: root/resolv/Makefile
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-10-14 10:54:39 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-10-14 10:54:39 +0200
commitf1f00c072138af90ae6da180f260111f09afe7a3 (patch)
treea9d805ee0cf1038733cc0529c8c02cc522083c92 /resolv/Makefile
parent08443b19965f48862b02c2fd7b33a39d66daf2ff (diff)
downloadglibc-f1f00c072138af90ae6da180f260111f09afe7a3.tar.gz
glibc-f1f00c072138af90ae6da180f260111f09afe7a3.tar.xz
glibc-f1f00c072138af90ae6da180f260111f09afe7a3.zip
resolv: Handle transaction ID collisions in parallel queries (bug 26600)
If the transaction IDs are equal, the old check attributed both
responses to the first query, not recognizing the second response.
This fixes bug 26600.
Diffstat (limited to 'resolv/Makefile')
-rw-r--r--resolv/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/resolv/Makefile b/resolv/Makefile
index b61c0c3e0c..dbd8f8bf4f 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -61,6 +61,11 @@ tests += \
   tst-resolv-search \
   tst-resolv-trailing \
 
+# This test calls __res_context_send directly, which is not exported
+# from libresolv.
+tests-internal += tst-resolv-txnid-collision
+tests-static += tst-resolv-txnid-collision
+
 # These tests need libdl.
 ifeq (yes,$(build-shared))
 tests += \
@@ -191,6 +196,8 @@ $(objpfx)tst-resolv-search: $(objpfx)libresolv.so $(shared-thread-library)
 $(objpfx)tst-resolv-trailing: $(objpfx)libresolv.so $(shared-thread-library)
 $(objpfx)tst-resolv-threads: \
   $(libdl) $(objpfx)libresolv.so $(shared-thread-library)
+$(objpfx)tst-resolv-txnid-collision: $(objpfx)libresolv.a \
+  $(static-thread-library)
 $(objpfx)tst-resolv-canonname: \
   $(libdl) $(objpfx)libresolv.so $(shared-thread-library)
 $(objpfx)tst-resolv-trustad: $(objpfx)libresolv.so $(shared-thread-library)