Le 01/09/2026 à 12:44 PM, Manu Nicolas a écrit :
The DNS code defines separate maximum message sizes for datagram and
stream processing, but both are the DNS protocol limit of 65535 bytes.
The duplicate names make common response buffers look transport-specific
and could allow the values to diverge.

Replace them with DNS_MAX_MSG_SIZE. This does not change any limit or
runtime behavior.
---
  include/haproxy/dns-t.h       |  4 ++--
  include/haproxy/resolvers-t.h |  5 ++---
  src/dns.c                     | 16 ++++++++--------
  src/resolvers.c               |  6 +++---
  4 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/include/haproxy/dns-t.h b/include/haproxy/dns-t.h
index 10175cfdf..c00075572 100644
--- a/include/haproxy/dns-t.h
+++ b/include/haproxy/dns-t.h
@@ -39,8 +39,8 @@
  /* max pending requests per stream */
  #define DNS_STREAM_MAX_PIPELINED_REQ  4
-#define DNS_TCP_MSG_MAX_SIZE 65535
-#define DNS_TCP_MSG_RING_MAX_SIZE (1 + 1 + 3 + DNS_TCP_MSG_MAX_SIZE) // 
varint_bytes(DNS_TCP_MSG_MAX_SIZE) == 3
+#define DNS_MAX_MSG_SIZE 65535
+#define DNS_TCP_MSG_RING_MAX_SIZE (1 + 1 + 3 + DNS_MAX_MSG_SIZE) // 
varint_bytes(DNS_MAX_MSG_SIZE) == 3
It seems DNS_TCP_MSG_RING_MAX_SIZE can also be renamed removing _TCP_ part because it is used to initialize the dgram ring too. Can you handle it ?

--
Christopher Faulet



Reply via email to