diff options
author | Melanie Thielker | 2017-03-31 14:44:22 +0100 |
---|---|---|
committer | Melanie Thielker | 2017-03-31 14:44:22 +0100 |
commit | 6463ab7d795933ed6745b4e43cab7bc6ffe98c0a (patch) | |
tree | d7e3671f07da0c15cb1eab41ad9721618a1d14b6 | |
parent | Prevent error spew when script send IM to HG users before HG is up (diff) | |
download | opensim-SC_OLD-6463ab7d795933ed6745b4e43cab7bc6ffe98c0a.zip opensim-SC_OLD-6463ab7d795933ed6745b4e43cab7bc6ffe98c0a.tar.gz opensim-SC_OLD-6463ab7d795933ed6745b4e43cab7bc6ffe98c0a.tar.bz2 opensim-SC_OLD-6463ab7d795933ed6745b4e43cab7bc6ffe98c0a.tar.xz |
If a DNS resolution fails on an outbound request, simply allow it
-rw-r--r-- | OpenSim/Framework/OutboundUrlFilter.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Framework/OutboundUrlFilter.cs b/OpenSim/Framework/OutboundUrlFilter.cs index ee4707f..63ae361 100644 --- a/OpenSim/Framework/OutboundUrlFilter.cs +++ b/OpenSim/Framework/OutboundUrlFilter.cs | |||
@@ -212,7 +212,17 @@ namespace OpenSim.Framework | |||
212 | // Check that we are permitted to make calls to this endpoint. | 212 | // Check that we are permitted to make calls to this endpoint. |
213 | bool foundIpv4Address = false; | 213 | bool foundIpv4Address = false; |
214 | 214 | ||
215 | IPAddress[] addresses = Dns.GetHostAddresses(url.Host); | 215 | IPAddress[] addresses = null; |
216 | |||
217 | try | ||
218 | { | ||
219 | addresses = Dns.GetHostAddresses(url.Host); | ||
220 | } | ||
221 | catch | ||
222 | { | ||
223 | // If there is a DNS error, we can't stop the script! | ||
224 | return true; | ||
225 | } | ||
216 | 226 | ||
217 | foreach (IPAddress addr in addresses) | 227 | foreach (IPAddress addr in addresses) |
218 | { | 228 | { |
@@ -253,4 +263,4 @@ namespace OpenSim.Framework | |||
253 | return allowed; | 263 | return allowed; |
254 | } | 264 | } |
255 | } | 265 | } |
256 | } \ No newline at end of file | 266 | } |