Else we get different behavior with empty vs. non-existinf <VMID>.fw
my $conf = $vmdata->{qemu}->{$vmid};
my $vmfw_conf = $vmfw_configs->{$vmid};
next if !$vmfw_conf;
my $conf = $vmdata->{qemu}->{$vmid};
my $vmfw_conf = $vmfw_configs->{$vmid};
next if !$vmfw_conf;
- next if defined($vmfw_conf->{options}->{enable}) && ($vmfw_conf->{options}->{enable} == 0);
+ next if !$vmfw_conf->{options}->{enable};
foreach my $netid (keys %$conf) {
next if $netid !~ m/^net(\d+)$/;
foreach my $netid (keys %$conf) {
next if $netid !~ m/^net(\d+)$/;
my $vmfw_conf = $vmfw_configs->{$vmid};
next if !$vmfw_conf;
my $vmfw_conf = $vmfw_configs->{$vmid};
next if !$vmfw_conf;
- next if defined($vmfw_conf->{options}->{enable}) && ($vmfw_conf->{options}->{enable} == 0);
+ next if !$vmfw_conf->{options}->{enable};
if ($conf->{ip_address} && $conf->{ip_address}->{value}) {
my $ip = $conf->{ip_address}->{value};
if ($conf->{ip_address} && $conf->{ip_address}->{value}) {
my $ip = $conf->{ip_address}->{value};
-# empty file (enables firewall)
\ No newline at end of file
-# empty file (enables firewall)
\ No newline at end of file
+[OPTIONS]
+
+enable: 1
+
[RULES]
IN ACCEPT -source 192.168.2.1 -p tcp -dport 22
[RULES]
IN ACCEPT -source 192.168.2.1 -p tcp -dport 22
+[OPTIONS]
+
+enable: 1
+
[RULES]
IN ACCEPT -source 192.168.2.1 -p tcp -dport 22
[RULES]
IN ACCEPT -source 192.168.2.1 -p tcp -dport 22
-# empty file (enables firewall)
\ No newline at end of file
-# empty file (enables firewall)
\ No newline at end of file