Skip to content

Commit

Permalink
fix: DoQ msg id issue
Browse files Browse the repository at this point in the history
  • Loading branch information
EkkoG committed Sep 26, 2024
1 parent 543f6cb commit c4ed56e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions control/dns_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,12 @@ func (c *DnsController) dialSend(invokingDepth int, req *udpRequest, data []byte
_ = stream.Close()
}()

// According https://datatracker.ietf.org/doc/html/rfc9250#section-4.2.1
// msg id should set to 0 when transport over QUIC.
// thanks https://github.com/natesales/q/blob/1cb2639caf69bd0a9b46494a3c689130df8fb24a/transport/quic.go#L97
binary.BigEndian.PutUint16(data[0:2], 0)


msg, err := streamDNS(stream, data)
if err != nil {
return err
Expand Down

0 comments on commit c4ed56e

Please sign in to comment.