summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorMichael Kutzner <65556178+mikure@users.noreply.github.com>2021-06-15 09:53:55 +0200
committerGitHub <noreply@github.com>2021-06-15 08:53:55 +0100
commitaac2c49b9b8a241f7a13726cfa74bf3a67c9079f (patch)
tree920191d52391196fe9bf672ebeaf12909d01728e /synapse/http
parentRefactor `EventPersistenceQueue` (#10145) (diff)
downloadsynapse-aac2c49b9b8a241f7a13726cfa74bf3a67c9079f.tar.xz
Fix 'ip_range_whitelist' not working for federation servers (#10115)
Add 'federation_ip_range_whitelist'. This allows backwards-compatibility, If 'federation_ip_range_blacklist' is set. Otherwise 'ip_range_whitelist' will be used for federation servers.

Signed-off-by: Michael Kutzner 1mikure@gmail.com
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/matrixfederationclient.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 629373fc47..b8849c0150 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -318,7 +318,9 @@ class MatrixFederationHttpClient:
         # We need to use a DNS resolver which filters out blacklisted IP
         # addresses, to prevent DNS rebinding.
         self.reactor = BlacklistingReactorWrapper(
-            hs.get_reactor(), None, hs.config.federation_ip_range_blacklist
+            hs.get_reactor(),
+            hs.config.federation_ip_range_whitelist,
+            hs.config.federation_ip_range_blacklist,
         )  # type: ISynapseReactor
 
         user_agent = hs.version_string