VR: Do not add iptables rules for the revoked ip addresses (#6189)

(cherry picked from commit c61ea9f96d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Wei Zhou 2022-04-06 05:16:47 +02:00 committed by Rohit Yadav
parent 7398915517
commit 896faca0b7
1 changed files with 1 additions and 1 deletions

View File

@ -498,7 +498,7 @@ class CsIP:
if not inf.startswith("eth"):
continue
for address in addresses:
if "nw_type" in address and address["nw_type"] == "guest":
if "nw_type" in address and address["nw_type"] == "guest" and address["add"]:
self.fw.append(["filter", "front", "-A FORWARD -s %s -d %s -j ACL_INBOUND_%s" %
(address["network"], self.address["network"], self.dev)])
self.fw.append(["filter", "front", "-A FORWARD -s %s -d %s -j ACL_INBOUND_%s" %