equal
deleted
inserted
replaced
120 |
120 |
121 local realm = pre_result:get_attribute("realm"); |
121 local realm = pre_result:get_attribute("realm"); |
122 local nonce = pre_result:get_attribute("nonce"); |
122 local nonce = pre_result:get_attribute("nonce"); |
123 |
123 |
124 if not realm then |
124 if not realm then |
125 table.insert(result.warnings, "TURN server did not return an authentication realm"); |
125 table.insert(result.warnings, "TURN server did not return an authentication realm. Is authentication enabled?"); |
126 end |
126 end |
127 if not nonce then |
127 if not nonce then |
128 table.insert(result.warnings, "TURN server did not return a nonce"); |
128 table.insert(result.warnings, "TURN server did not return a nonce"); |
129 end |
129 end |
130 |
130 |
241 |
241 |
242 result.external_ip_pong = pong:get_xor_mapped_address(); |
242 result.external_ip_pong = pong:get_xor_mapped_address(); |
243 if not result.external_ip_pong then |
243 if not result.external_ip_pong then |
244 result.error = "Ping server did not return an address"; |
244 result.error = "Ping server did not return an address"; |
245 return result; |
245 return result; |
|
246 end |
|
247 |
|
248 if result.external_ip.address ~= result.external_ip_pong.address then |
|
249 table.insert(result.warnings, "TURN external IP vs relay address mismatch! Is the TURN server behind a NAT and misconfigured?"); |
246 end |
250 end |
247 |
251 |
248 -- |
252 -- |
249 |
253 |
250 return result; |
254 return result; |