File tree Expand file tree Collapse file tree
core/src/com/cloud/agent/resource/virtualnetwork Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ private Answer execute(SetFirewallRulesCommand cmd) {
224224 results [i ] = "Failed" ;
225225 }
226226 String routerIp = cmd .getAccessDetail (NetworkElementCommand .ROUTER_IP );
227+ String egressDefault = cmd .getAccessDetail (NetworkElementCommand .FIREWALL_EGRESS_DEFAULT );
227228
228229 if (routerIp == null ) {
229230 return new SetFirewallRulesAnswer (cmd , false , results );
@@ -239,6 +240,13 @@ private Answer execute(SetFirewallRulesCommand cmd) {
239240
240241 if (trafficType == FirewallRule .TrafficType .Egress ){
241242 command .add ("-E" );
243+ if (egressDefault .equals ("true" )) {
244+ command .add ("-P " , "1" );
245+ } else if (egressDefault .equals ("System" )) {
246+ command .add ("-P " , "2" );
247+ } else {
248+ command .add ("-P " , "0" );
249+ }
242250 }
243251
244252 StringBuilder sb = new StringBuilder ();
You can’t perform that action at this time.
0 commit comments