mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 03:32:33 +08:00
fix: avoid modifying the request message id
This commit is contained in:
parent
7d50bea4d2
commit
b4862b7124
|
@ -109,6 +109,7 @@ func (doh *dnsOverHTTPS) ExchangeContext(ctx context.Context, m *D.Msg) (msg *D.
|
|||
// formats that include the ID field from the DNS message header, such
|
||||
// as "application/dns-message", SHOULD use a DNS ID of 0 in every DNS
|
||||
// request.
|
||||
m=m.Copy()
|
||||
id := m.Id
|
||||
m.Id = 0
|
||||
defer func() {
|
||||
|
|
|
@ -89,6 +89,7 @@ func (doq *dnsOverQUIC) Address() string { return doq.addr }
|
|||
func (doq *dnsOverQUIC) ExchangeContext(ctx context.Context, m *D.Msg) (msg *D.Msg, err error) {
|
||||
// When sending queries over a QUIC connection, the DNS Message ID MUST be
|
||||
// set to zero.
|
||||
m = m.Copy()
|
||||
id := m.Id
|
||||
m.Id = 0
|
||||
defer func() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user