# HG changeset patch # User Matthew Wild # Date 1647688150 0 # Node ID 19fd28239e738e883dcac838decb4b20148ccdc0 # Parent a93e65784f2c5ddef0caef46580aa4300fb26f4f prosodyctl: check turn: Fail with error if our own address is supplied for the ping test diff -r a93e65784f2c -r 19fd28239e73 util/prosodyctl/check.lua --- a/util/prosodyctl/check.lua Sat Mar 19 09:28:27 2022 +0000 +++ b/util/prosodyctl/check.lua Sat Mar 19 11:09:10 2022 +0000 @@ -180,6 +180,12 @@ -- Only a hostname specified, use default STUN port ping_host, ping_port = ping_service, 3478; end + + if ping_host == turn_service.host then + result.error = ("Unable to perform ping test: please supply an external STUN server address. See https://prosody.im/doc/turn#prosodyctl-check"); + return result; + end + local ping_service_ip, err = socket.dns.toip(ping_host); if not ping_service_ip then result.error = "Unable to resolve ping service hostname: "..err;