Commit 31e86ed4 by Matt Berther Committed by beorn7

prevent adding empty target when CNAME is encountered

Signed-off-by: 's avatarMatt Berther <mattberther@users.noreply.github.com>
parent 0fd5ed06
......@@ -213,6 +213,7 @@ func (d *Discovery) refreshOne(ctx context.Context, name string, ch chan<- *targ
target = hostPort(addr.AAAA.String(), d.port)
case *dns.CNAME:
// CNAME responses can occur with "Type: A" dns_sd_config requests.
continue
default:
level.Warn(d.logger).Log("msg", "Invalid record", "record", record)
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment