This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 0c93a85b3a3 add ip rule for VPC extra IPs (#6846)
0c93a85b3a3 is described below
commit 0c93a85b3a3452be292621bd92a6c3b546db490f
Author: dahn <[email protected]>
AuthorDate: Mon Oct 31 15:13:19 2022 +0100
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")