ssvm: synchorise when adding iptables and routing rules (#6942)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
This commit is contained in:
Rohit Yadav 2023-01-11 16:51:46 +05:30 committed by GitHub
parent df96af3de4
commit a85973a0ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2225,7 +2225,13 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
return null;
}
public String allowOutgoingOnPrivate(String destCidr) {
/**
* allow *only one* setting of an outgoing destination at a time
*
* @destCidr the destination network that will be allowed for outgoing traffic.
* @return any error message that might be helpful or <null> on success or when called anywhere but in the router VM.
*/
public synchronized String allowOutgoingOnPrivate(String destCidr) {
if (!_inSystemVM) {
return null;
}