public inbox for pve-devel@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
  2026-09-23 19:15 ` applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ 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] 3+ 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
  2026-09-23 19:15 ` applied: " Thomas Lamprecht
  1 sibling, 0 replies; 3+ 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] 3+ messages in thread

* applied: [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
@ 2026-09-23 19:15 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2026-09-23 19:15 UTC (permalink / raw)
  To: pve-devel, Hannes Laimer

On Thu, 27 Aug 2026 13:58:03 +0200, 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.

Applied, thanks!

[1/1] nftables: build without the config extension
      commit: 91889449323d845530cacc92f62b8d50c287f784




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

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

Thread overview: 3+ 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
2026-09-23 19:15 ` applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal