rhtyd commented on a change in pull request #2681: Issue 2680: Source NAT
option on Private Gateway
URL: https://github.com/apache/cloudstack/pull/2681#discussion_r193622035
##########
File path: systemvm/debian/opt/cloud/bin/cs/CsAddress.py
##########
@@ -477,8 +477,8 @@ def fw_vpcrouter(self):
("eth1", "eth1", guestNetworkCidr)])
self.fw.append(["nat", "front",
- "-A POSTROUTING -s %s -o %s -j SNAT --to-source
%s" %
- (guestNetworkCidr, self.dev,
self.address['public_ip'])])
+ "-A POSTROUTING -o %s -j SNAT --to-source %s" %
+ (self.dev, self.address['public_ip'])])
Review comment:
@Slair1 to minimize impact/regression from this, can you consider
@ustcweizhou 's advise on doing something like :
```
if self.address["source_nat"]:
self.fw.append(new rule)
else:
self.fw.append(old rule)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services