[pve-devel] [PATCH proxmox-ve-rs v3 02/24] firewall: add sdn scope for ipsets

Stefan Hanreich s.hanreich at proxmox.com
Tue Nov 12 13:25:40 CET 2024


Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
 proxmox-ve-config/src/firewall/types/ipset.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/proxmox-ve-config/src/firewall/types/ipset.rs b/proxmox-ve-config/src/firewall/types/ipset.rs
index c1af642..6fbdca8 100644
--- a/proxmox-ve-config/src/firewall/types/ipset.rs
+++ b/proxmox-ve-config/src/firewall/types/ipset.rs
@@ -14,6 +14,7 @@ use crate::guest::vm::NetworkConfig;
 pub enum IpsetScope {
     Datacenter,
     Guest,
+    Sdn,
 }
 
 impl FromStr for IpsetScope {
@@ -23,6 +24,7 @@ impl FromStr for IpsetScope {
         Ok(match s {
             "+dc" => IpsetScope::Datacenter,
             "+guest" => IpsetScope::Guest,
+            "+sdn" => IpsetScope::Sdn,
             _ => bail!("invalid scope for ipset: {s}"),
         })
     }
@@ -33,6 +35,7 @@ impl Display for IpsetScope {
         let prefix = match self {
             Self::Datacenter => "dc",
             Self::Guest => "guest",
+            Self::Sdn => "sdn",
         };
 
         f.write_str(prefix)
-- 
2.39.5




More information about the pve-devel mailing list