]> git.proxmox.com Git - pve-firewall.git/commitdiff
rename ebtables_enable to ebtables
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 6 Jun 2018 09:56:05 +0000 (11:56 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 6 Jun 2018 13:51:43 +0000 (15:51 +0200)
and register ebtables option with the API

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PVE/Firewall.pm

index 7cdd08e6c7bfdb9d6c329c3db989ede967c2d843..62cbf66268a4b4ee89b49df4fd4ff66b0887521d 100644 (file)
@@ -1180,6 +1180,12 @@ our $cluster_option_properties = {
        minimum => 0,
        optional => 1,
     },
        minimum => 0,
        optional => 1,
     },
+    ebtables => {
+       description => "Enable ebtables rules cluster wide.",
+       type => 'boolean',
+       default => 1,
+       optional => 1,
+    },
     policy_in => {
        description => "Input policy.",
        type => 'string',
     policy_in => {
        description => "Input policy.",
        type => 'string',
@@ -2658,7 +2664,7 @@ sub parse_clusterfw_option {
        if (($value > 1) && ((time() - $value) > 60)) {
            $value = 0
        }
        if (($value > 1) && ((time() - $value) > 60)) {
            $value = 0
        }
-    } elsif ($line =~ m/^(ebtables_enable):\s*(0|1)\s*$/i) {
+    } elsif ($line =~ m/^(ebtables):\s*(0|1)\s*$/i) {
        $opt = lc($1);
        $value = int($2);
     } elsif ($line =~ m/^(policy_(in|out)):\s*(ACCEPT|DROP|REJECT)\s*$/i) {
        $opt = lc($1);
        $value = int($2);
     } elsif ($line =~ m/^(policy_(in|out)):\s*(ACCEPT|DROP|REJECT)\s*$/i) {
@@ -3651,7 +3657,7 @@ sub compile_ipsets {
 sub compile_ebtables_filter {
     my ($cluster_conf, $hostfw_conf, $vmfw_configs, $vmdata, $verbose) = @_;
 
 sub compile_ebtables_filter {
     my ($cluster_conf, $hostfw_conf, $vmfw_configs, $vmdata, $verbose) = @_;
 
-    if (!($cluster_conf->{options}->{ebtables_enable} // 1)) {
+    if (!($cluster_conf->{options}->{ebtables} // 1)) {
        return {};
     }
 
        return {};
     }