Skip to content

Commit

Permalink
mdns: m net.IP in dns-sd answer instead of a ptr to it
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Sep 12, 2023
1 parent c12e08f commit e6aba29
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions intra/dns53/mdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ type dnssdanswer struct {
ans *dns.Msg
name string
target string
ip4 *net.IP
ip6 *net.IP
ip4 net.IP
ip6 net.IP
port int
txt []string
captured bool
Expand Down Expand Up @@ -382,11 +382,13 @@ loop:
// todo: r.ans = ans ?
case *dns.A:
disco = c.track(rr.Hdr.Name)
disco.ip4 = &rr.A
// todo: append to ip4?
disco.ip4 = rr.A
disco.ans = msg
case *dns.AAAA:
disco = c.track(rr.Hdr.Name)
disco.ip6 = &rr.AAAA
// todo: append to ip6?
disco.ip6 = rr.AAAA
disco.ans = msg
default:
log.I("mdns: ignoring ans %s to %s", rr, disco.name)
Expand Down

1 comment on commit e6aba29

@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.