all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-firewall] nftables: build without the config extension
@ 2026-08-27 11:58 Hannes Laimer
  2026-09-23 10:00 ` Stefan Hanreich
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Laimer @ 2026-08-27 11:58 UTC (permalink / raw)
  To: pve-devel

The bridge-name import and the anyhow imports were unconditional
although only the config extension uses them, so without that feature
the crate failed to build and warned about unused imports.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 proxmox-nftables/src/expression.rs | 3 ++-
 proxmox-nftables/src/statement.rs  | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/proxmox-nftables/src/expression.rs b/proxmox-nftables/src/expression.rs
index 0b46cc5..ca7a4e7 100644
--- a/proxmox-nftables/src/expression.rs
+++ b/proxmox-nftables/src/expression.rs
@@ -1,5 +1,4 @@
 use crate::types::{ElemConfig, Verdict};
-use proxmox_ve_config::host::types::BridgeName;
 use serde::{Deserialize, Serialize};
 use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
 
@@ -13,6 +12,8 @@ use proxmox_ve_config::firewall::types::port::{PortEntry, PortList};
 use proxmox_ve_config::firewall::types::rule_match::{IcmpCode, IcmpType, Icmpv6Code, Icmpv6Type};
 #[cfg(feature = "config-ext")]
 use proxmox_ve_config::guest::types::Vmid;
+#[cfg(feature = "config-ext")]
+use proxmox_ve_config::host::types::BridgeName;
 
 #[derive(Clone, Debug, Deserialize, Serialize)]
 #[serde(rename_all = "lowercase")]
diff --git a/proxmox-nftables/src/statement.rs b/proxmox-nftables/src/statement.rs
index d8899a8..44a4c48 100644
--- a/proxmox-nftables/src/statement.rs
+++ b/proxmox-nftables/src/statement.rs
@@ -1,3 +1,4 @@
+#[cfg(feature = "config-ext")]
 use anyhow::{Error, bail};
 use serde::{Deserialize, Serialize};
 
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH proxmox-firewall] nftables: build without the config extension
  2026-08-27 11:58 [PATCH proxmox-firewall] nftables: build without the config extension Hannes Laimer
@ 2026-09-23 10:00 ` Stefan Hanreich
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hanreich @ 2026-09-23 10:00 UTC (permalink / raw)
  To: pve-devel

lgtm

Reviewed-by: Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by: Stefan Hanreich <s.hanreich@proxmox.com>

On 8/27/26 1:58 PM, Hannes Laimer wrote:
> The bridge-name import and the anyhow imports were unconditional
> although only the config extension uses them, so without that feature
> the crate failed to build and warned about unused imports.
> 
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
>  proxmox-nftables/src/expression.rs | 3 ++-
>  proxmox-nftables/src/statement.rs  | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/proxmox-nftables/src/expression.rs b/proxmox-nftables/src/expression.rs
> index 0b46cc5..ca7a4e7 100644
> --- a/proxmox-nftables/src/expression.rs
> +++ b/proxmox-nftables/src/expression.rs
> @@ -1,5 +1,4 @@
>  use crate::types::{ElemConfig, Verdict};
> -use proxmox_ve_config::host::types::BridgeName;
>  use serde::{Deserialize, Serialize};
>  use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
>  
> @@ -13,6 +12,8 @@ use proxmox_ve_config::firewall::types::port::{PortEntry, PortList};
>  use proxmox_ve_config::firewall::types::rule_match::{IcmpCode, IcmpType, Icmpv6Code, Icmpv6Type};
>  #[cfg(feature = "config-ext")]
>  use proxmox_ve_config::guest::types::Vmid;
> +#[cfg(feature = "config-ext")]
> +use proxmox_ve_config::host::types::BridgeName;
>  
>  #[derive(Clone, Debug, Deserialize, Serialize)]
>  #[serde(rename_all = "lowercase")]
> diff --git a/proxmox-nftables/src/statement.rs b/proxmox-nftables/src/statement.rs
> index d8899a8..44a4c48 100644
> --- a/proxmox-nftables/src/statement.rs
> +++ b/proxmox-nftables/src/statement.rs
> @@ -1,3 +1,4 @@
> +#[cfg(feature = "config-ext")]
>  use anyhow::{Error, bail};
>  use serde::{Deserialize, Serialize};
>  





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-23 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 11:58 [PATCH proxmox-firewall] nftables: build without the config extension Hannes Laimer
2026-09-23 10:00 ` Stefan Hanreich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal