all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager v2 08/11] ui: sdn: disable SNAT for IPv6 subnets
Date: Thu, 30 Apr 2026 16:29:50 +0200	[thread overview]
Message-ID: <20260430142953.315412-9-h.laimer@proxmox.com> (raw)
In-Reply-To: <20260430142953.315412-1-h.laimer@proxmox.com>

SNAT has no meaning on IPv6 subnets in this configuration. Disable
the field and clear it whenever the subnet field holds an IPv6
prefix.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 www/manager6/sdn/SubnetEdit.js | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/www/manager6/sdn/SubnetEdit.js b/www/manager6/sdn/SubnetEdit.js
index a3608428..630b10b8 100644
--- a/www/manager6/sdn/SubnetEdit.js
+++ b/www/manager6/sdn/SubnetEdit.js
@@ -2,6 +2,21 @@ Ext.define('PVE.sdn.SubnetInputPanel', {
     extend: 'Proxmox.panel.InputPanel',
     mixins: ['Proxmox.Mixin.CBind'],
 
+    updateSnatState: function (cidr) {
+        let me = this;
+        let snatField = me.down('[name=snat]');
+        if (!snatField) {
+            return;
+        }
+
+        let addr = cidr ? cidr.split('/')[0] : '';
+        let isV6 = !!addr && Proxmox.Utils.IP6_match.test(addr);
+        snatField.setDisabled(isV6);
+        if (isV6) {
+            snatField.setValue(false);
+        }
+    },
+
     onGetValues: function (values) {
         let me = this;
 
@@ -24,6 +39,14 @@ Ext.define('PVE.sdn.SubnetInputPanel', {
             flex: 1,
             allowBlank: false,
             fieldLabel: gettext('Subnet'),
+            listeners: {
+                change: function (field, value) {
+                    let panel = field.up('inputpanel');
+                    if (panel) {
+                        panel.updateSnatState(value);
+                    }
+                },
+            },
         },
         {
             xtype: 'proxmoxtextfield',
@@ -288,6 +311,7 @@ Ext.define('PVE.sdn.SubnetEdit', {
             me.load({
                 success: function (response, options) {
                     me.setValues(response.result.data);
+                    ipanel.updateSnatState(response.result.data.cidr);
                 },
             });
         }
-- 
2.47.3





  parent reply	other threads:[~2026-04-30 14:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 14:29 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 00/11] sdn: evpn: add IPv6 RA / SLAAC support Hannes Laimer
2026-04-30 14:29 ` [PATCH proxmox-ve-rs v2 01/11] frr: add IPv6 router advertisement support Hannes Laimer
2026-04-30 14:29 ` [PATCH proxmox-ve-rs v2 02/11] ve-config: add per-vnet IPv6 RA configuration Hannes Laimer
2026-04-30 14:29 ` [PATCH proxmox-perl-rs v2 03/11] pve-rs: sdn: add IPv6 RA builder binding Hannes Laimer
2026-04-30 14:29 ` [PATCH pve-network v2 04/11] sdn: evpn: add IPv6 RA / SLAAC support Hannes Laimer
2026-04-30 14:29 ` [PATCH pve-network v2 05/11] sdn: evpn: derive IP version from CIDR for gateway-less subnets Hannes Laimer
2026-04-30 14:29 ` [PATCH pve-network v2 06/11] sdn: evpn: accept untracked IPv6 NA on EVPN vnet bridges Hannes Laimer
2026-04-30 14:29 ` [PATCH pve-network v2 07/11] api: vnet: include zone-type in vnet list Hannes Laimer
2026-04-30 14:29 ` Hannes Laimer [this message]
2026-04-30 14:29 ` [PATCH pve-manager v2 09/11] ui: sdn: add IPv6 RA / SLAAC support Hannes Laimer
2026-04-30 14:29 ` [PATCH pve-docs v2 10/11] sdn: document IPv6 RA / SLAAC configuration Hannes Laimer
2026-04-30 14:29 ` [PATCH pve-docs v2 11/11] sdn: add example for IPv6 in an EVPN zone Hannes Laimer

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=20260430142953.315412-9-h.laimer@proxmox.com \
    --to=h.laimer@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 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