add ip rule for VPC extra IPs (#6846)

This commit is contained in:
dahn 2022-10-31 15:13:19 +01:00 committed by GitHub
parent d7dedfff1f
commit 0c93a85b3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -610,6 +610,9 @@ class CsIP:
if "nw_type" in address and address["nw_type"] == "guest":
route.add_network_route(self.dev, str(address["network"]))
if self.get_type() in ["public"]:
CsRule(self.dev).addRule("from " + str(self.address["network"]))
route.add_network_route(self.dev, str(self.address["network"]))
CsHelper.execute("sudo ip route flush cache")