Fix interface option with method = native in ping input (#6667)

This commit is contained in:
Daniel Nelson
2019-11-18 10:27:31 -08:00
committed by GitHub
parent e8d6d445f4
commit 9f05163c53

View File

@@ -118,7 +118,7 @@ func (*Ping) SampleConfig() string {
}
func (p *Ping) Gather(acc telegraf.Accumulator) error {
if p.Interface != "" && p.listenAddr != "" {
if p.Interface != "" && p.listenAddr == "" {
p.listenAddr = getAddr(p.Interface)
}