mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-02 14:42:34 -08:00
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 <[email protected]>
(cherry picked from commit 7ad13349f1)
This commit is contained in:
1 parent
9b458a4ef4
commit
8a925434dc
1 file changed
+1
-1
@@ -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{
|
||||
|
||||
Reference in new issue
Block a user