File tree Expand file tree Collapse file tree
plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -764,12 +764,20 @@ protected SetFirewallRulesAnswer execute(SetFirewallRulesCommand cmd) {
764764 String [] results = new String [cmd .getRules ().length ];
765765 FirewallRuleTO [] allrules = cmd .getRules ();
766766 FirewallRule .TrafficType trafficType = allrules [0 ].getTrafficType ();
767+ String egressDefault = cmd .getAccessDetail (NetworkElementCommand .FIREWALL_EGRESS_DEFAULT );
767768
768769 String [][] rules = cmd .generateFwRules ();
769770 String args = "" ;
770771 args += " -F " ;
771772 if (trafficType == FirewallRule .TrafficType .Egress ){
772773 args += " -E " ;
774+ if (egressDefault .equals ("true" )) {
775+ args += " -P 1 " ;
776+ } else if (egressDefault .equals ("System" )) {
777+ args += " -P 2 " ;
778+ } else {
779+ args += " -P 0 " ;
780+ }
773781 }
774782
775783 StringBuilder sb = new StringBuilder ();
You can’t perform that action at this time.
0 commit comments