X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=blobdiff_plain;f=src%2FPVE%2FFirewall.pm;h=1438125b4c31e298b37a9699502253d4698b6034;hp=a2e6b7934e59fc4b5f57acdf64befa5686a82186;hb=e74a87f5ce727e5e3e87869d6bd5f578eaef6a29;hpb=bc374ca7cfd083a665f07b8902d63754c8c2a6a6 diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index a2e6b79..1438125 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -7,7 +7,7 @@ use Data::Dumper; use Digest::SHA; use PVE::INotify; use PVE::Exception qw(raise raise_param_exc); -use PVE::JSONSchema qw(get_standard_option); +use PVE::JSONSchema qw(register_standard_option get_standard_option); use PVE::Cluster; use PVE::ProcFSTools; use PVE::Tools qw($IPV4RE); @@ -48,6 +48,13 @@ sub pve_verify_ipv4_or_cidr { die "value does not look like a valid IP address or CIDR network\n"; } +PVE::JSONSchema::register_standard_option('ipset-name', { + description => "IP set name.", + type => 'string', + pattern => '[A-Za-z][A-Za-z0-9\-\_]+', + minLength => 2, + maxLength => 20, +}); my $feature_ipset_nomatch = 0; eval {