mdns: avoid dropping large answers that could not be decoded completely

This commit is contained in:
Patricio Whittingslow
2026-03-17 16:36:00 -03:00
parent 3cdb0a83fd
commit 493446244f
2 changed files with 45 additions and 2 deletions
+2 -2
View File
@@ -174,8 +174,8 @@ func (c *Client) Demux(carrierData []byte, frameOffset int) error {
// Incoming query — match against our services.
var query dns.Message
query.LimitResourceDecoding(f.QDCount(), 0, 0, 0)
_, _, err = query.Decode(frame)
if err != nil {
_, incomplete, err := query.Decode(frame)
if err != nil && !incomplete {
return err
}
for i := range query.Questions {