From 8a925434dc1a12e225bf20cecc2f561e46da51e9 Mon Sep 17 00:00:00 2001 From: James Tucker Date: Thu, 29 Oct 2026 07:07:43 +0000 Subject: [PATCH] ipn/ipnlocal: randomize DNS query IDs Allocate a fresh 16-bit ID for each QueryDNS request instead of using the constant ID 1. Updates tailscale/corp#48187 Change-Id: I9b47a3fbbef70f0462f1da4f3b29eb77cf31f9f0 Signed-off-by: James Tucker (cherry picked from commit 7ad13349f12a58950159c8dfe1e1bd8d2295350e) --- ipn/ipnlocal/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index e98539269..993ffd199 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -973,7 +973,7 @@ func (b *LocalBackend) QueryDNS(ctx context.Context, name string, queryType dnsm db := dnsmessage.NewBuilder(nil, dnsmessage.Header{ OpCode: 0, RecursionDesired: true, - ID: 1, + ID: uint16(rand.IntN(1 << 16)), }) db.StartQuestions() db.Question(dnsmessage.Question{