From 0c93a85b3a3452be292621bd92a6c3b546db490f Mon Sep 17 00:00:00 2001 From: dahn Date: Mon, 31 Oct 2022 15:13:19 +0100 Subject: [PATCH] add ip rule for VPC extra IPs (#6846) --- systemvm/debian/opt/cloud/bin/cs/CsAddress.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py index 91422602bde..058075edaf1 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py @@ -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")