prosodyctl: check turn: improve warning text to suggest issues
authorMatthew Wild <mwild1@gmail.com>
Sat, 05 Mar 2022 20:34:24 +0000
changeset 12387 a9b6ed86b573
parent 12386 574cf096a426
child 12388 53b4549c2209
prosodyctl: check turn: improve warning text to suggest issues
util/prosodyctl/check.lua
--- a/util/prosodyctl/check.lua	Sat Mar 05 20:32:47 2022 +0000
+++ b/util/prosodyctl/check.lua	Sat Mar 05 20:34:24 2022 +0000
@@ -122,7 +122,7 @@
 	local nonce = pre_result:get_attribute("nonce");
 
 	if not realm then
-		table.insert(result.warnings, "TURN server did not return an authentication realm");
+		table.insert(result.warnings, "TURN server did not return an authentication realm. Is authentication enabled?");
 	end
 	if not nonce then
 		table.insert(result.warnings, "TURN server did not return a nonce");
@@ -245,6 +245,10 @@
 		return result;
 	end
 
+	if result.external_ip.address ~= result.external_ip_pong.address then
+		table.insert(result.warnings, "TURN external IP vs relay address mismatch! Is the TURN server behind a NAT and misconfigured?");
+	end
+
 	--
 
 	return result;