Software /
code /
prosody
Changeset
12416:19fd28239e73 0.12
prosodyctl: check turn: Fail with error if our own address is supplied for the ping test
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 19 Mar 2022 11:09:10 +0000 |
parents | 12414:a93e65784f2c |
children | 12417:3635b0bfbd55 12418:dd47adf74e93 |
files | util/prosodyctl/check.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;