mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Fix
This commit is contained in:
parent
5ee5c8224e
commit
9be79614a3
@ -164,11 +164,13 @@ class PartitionManager:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _is_ipv6_rule(rule):
|
def _is_ipv6_rule(rule):
|
||||||
if "source" in rule:
|
if rule.get("source"):
|
||||||
return ipaddress.ip_address(rule["source"]).version == 6
|
return ipaddress.ip_address(rule["source"]).version == 6
|
||||||
if "destination" in rule:
|
if rule.get("destination"):
|
||||||
return ipaddress.ip_address(rule["destination"]).version == 6
|
return ipaddress.ip_address(rule["destination"]).version == 6
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
def _add_rule(self, rule):
|
def _add_rule(self, rule):
|
||||||
if self._is_ipv6_rule(rule):
|
if self._is_ipv6_rule(rule):
|
||||||
_NetworkManager.get().add_ip6tables_rule(**rule)
|
_NetworkManager.get().add_ip6tables_rule(**rule)
|
||||||
|
Loading…
Reference in New Issue
Block a user