public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: Lukas Sichert <l.sichert@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [RFC manager/network 0/3] fix #5066: make generated snat rules flushable
Date: Mon, 22 Jun 2026 11:06:28 +0200	[thread overview]
Message-ID: <2c0cfc85-b1c5-4bfc-9f0d-8ce903e8c77e@proxmox.com> (raw)
In-Reply-To: <20260605114810.43030-1-l.sichert@proxmox.com>

could you rebase this and resend?

On 6/5/26 1:48 PM, Lukas Sichert wrote:
> When creating a subnet with SNAT enabled and applying the changes, then
> afterwards disabling SNAT and applying the changes again, the iptables
> POSTROUTING rule still persists. This is because ifreload -a only
> executes (post/pre-)down hooks when an interface is removed from
> /etc/network/interfaces, while the (post/pre-)up hooks are always
> executed [1]. As a result, the SNAT rule is not removed by 'ifreload -a' and
> only a restart or 'ifdown' will remove it.
> 
> This series moves generated SDN SNAT rules into a dedicated
> 'PROXMOX-SDN' chain in the iptables nat table and adds a jump from
> POSTROUTING to that chain. This keeps the generated rules separate from
> custom rules added by users or other components.
> 
> The dedicated chain can then be flushed during network reload, removing
> stale SDN SNAT rules without touching unrelated POSTROUTING rules.
> 
> As this changes the generated /etc/network/interfaces.d/sdn output, the
> expected test output is adjusted accordingly.
> 
> This series applies on top of
> https://lore.proxmox.com/all/20260603142921.91174-1-l.sichert@proxmox.com/
> 
> [1] manpages.debian.org/testing/ifupdown2/ifreload.8.en.html
> 
> 
> network:
> 
> Lukas Sichert (2):
>   fix #5066: snat: push evpn snat rules into separate iptables chain
>   fix #5066: snat: push simplezone snat rules into separate iptables
>     chain
> 
>  src/PVE/Network/SDN/Zones/EvpnPlugin.pm        | 15 +++++++++++++--
>  src/PVE/Network/SDN/Zones/SimplePlugin.pm      | 18 +++++++++++++++---
>  .../evpn/exitnode_snat/expected_sdn_interfaces | 16 ++++++++++++----
>  .../simple/ipv4snat/expected_sdn_interfaces    |  8 ++++++--
>  .../simple/ipv6snat/expected_sdn_interfaces    |  8 ++++++--
>  5 files changed, 52 insertions(+), 13 deletions(-)
> 
> 
> manager:
> 
> Lukas Sichert (1):
>   fix #5066: reload networking: flush PROXMOX-SDN iptables chain at
>     reload
> 
>  .codex              | 0
>  PVE/API2/Network.pm | 3 +++
>  2 files changed, 3 insertions(+)
>  create mode 100644 .codex
> 
> 
> Summary over all repositories:
>   7 files changed, 55 insertions(+), 13 deletions(-)
> 





  parent reply	other threads:[~2026-06-22  9:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05 11:48 [RFC manager/network 0/3] fix #5066: make generated snat rules flushable Lukas Sichert
2026-06-05 11:48 ` [PATCH network 1/3] fix #5066: snat: push evpn snat rules into separate iptables chain Lukas Sichert
2026-06-05 11:48 ` [PATCH network 2/3] fix #5066: snat: push simplezone " Lukas Sichert
2026-06-05 11:48 ` [PATCH manager 3/3] fix #5066: reload networking: flush PROXMOX-SDN iptables chain at reload Lukas Sichert
2026-06-22  9:06 ` Stefan Hanreich [this message]
2026-06-23 13:57 ` superseded: [RFC manager/network 0/3] fix #5066: make generated snat rules flushable Lukas Sichert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c0cfc85-b1c5-4bfc-9f0d-8ce903e8c77e@proxmox.com \
    --to=s.hanreich@proxmox.com \
    --cc=l.sichert@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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