代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/firewalld 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From b3c43ee7be2411a8d17416b98616378078f21eef Mon Sep 17 00:00:00 2001
From: Eric Garver <e@erig.me>
Date: Thu, 27 Sep 2018 08:52:22 -0400
Subject: [PATCH 009/127] nftables: fix destination checks not allowing masks
Some destination checks were using check_single_address() which make it
impossible to use a mask. This was discovered in issue #399.
---
src/firewall/core/nftables.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/firewall/core/nftables.py b/src/firewall/core/nftables.py
index 811f4e71..64191d1f 100644
--- a/src/firewall/core/nftables.py
+++ b/src/firewall/core/nftables.py
@@ -753,7 +753,7 @@ class nftables(object):
return []
rule_fragment = []
- if check_single_address("ipv4", rich_dest.addr):
+ if check_address("ipv4", rich_dest.addr):
rule_fragment += ["ip"]
else:
rule_fragment += ["ip6"]
@@ -803,7 +803,7 @@ class nftables(object):
if rich_rule:
rule_fragment += self._rich_rule_family_fragment(rich_rule.family)
if destination:
- if check_single_address("ipv4", destination):
+ if check_address("ipv4", destination):
rule_fragment += ["ip"]
else:
rule_fragment += ["ip6"]
@@ -835,7 +835,7 @@ class nftables(object):
if rich_rule:
rule_fragment += self._rich_rule_family_fragment(rich_rule.family)
if destination:
- if check_single_address("ipv4", destination):
+ if check_address("ipv4", destination):
rule_fragment += ["ip"]
else:
rule_fragment += ["ip6"]
@@ -869,7 +869,7 @@ class nftables(object):
if rich_rule:
rule_fragment += self._rich_rule_family_fragment(rich_rule.family)
if destination:
- if check_single_address("ipv4", destination):
+ if check_address("ipv4", destination):
rule_fragment += ["ip"]
else:
rule_fragment += ["ip6"]
@@ -900,7 +900,7 @@ class nftables(object):
rule = [add_del, "rule", "inet", "%s" % TABLE_NAME,
"raw_%s_allow" % (target), proto]
if destination:
- if check_single_address("ipv4", destination):
+ if check_address("ipv4", destination):
rule += ["ip"]
else:
rule += ["ip6"]
--
2.19.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。