Skip to content

Commit

Permalink
mdns: never send empty embedded err
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Sep 13, 2023
1 parent 6e8b8a2 commit 2913435
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions intra/dns53/mdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ import (
)

var (
errNoProtos = errors.New("enable at least one of IPv4 and IPv6 querying")
errBindFail = errors.New("failed to bind to udp port")
errNoProtos = errors.New("enable at least one of IPv4 and IPv6 querying")
errBindFail = errors.New("failed to bind to udp port")
errNoMdnsAnswer = errors.New("no mdns answer")
)

type dnssd struct {
Expand Down Expand Up @@ -114,7 +115,7 @@ func (t *dnssd) oneshotQuery(msg *dns.Msg) (*dns.Msg, *dnsx.QueryError) {
}
}
log.I("mdns: oquery: no response for %s", qname)
return nil, dnsx.NewNoResponseQueryError(nil)
return nil, dnsx.NewNoResponseQueryError(errNoMdnsAnswer)
}

func (t *dnssd) Query(_ string, q []byte, summary *dnsx.Summary) (r []byte, err error) {
Expand Down

1 comment on commit 2913435

@ignoramous
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.