未验证 提交 acee998d 编写于 作者: M Matt Berther 提交者: GitHub

CNAME responses can occur with "Type: A" dns_sd_config requests (#8216)

Signed-off-by: NMatt Berther <mattberther@users.noreply.github.com>
上级 a6e18916
......@@ -211,8 +211,10 @@ func (d *Discovery) refreshOne(ctx context.Context, name string, ch chan<- *targ
target = hostPort(addr.A.String(), d.port)
case *dns.AAAA:
target = hostPort(addr.AAAA.String(), d.port)
case *dns.CNAME:
// CNAME responses can occur with "Type: A" dns_sd_config requests.
default:
level.Warn(d.logger).Log("msg", "Invalid SRV record", "record", record)
level.Warn(d.logger).Log("msg", "Invalid record", "record", record)
continue
}
tg.Targets = append(tg.Targets, model.LabelSet{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册