[pve-devel] [PATCH firewall/manager] firewall: introduce scoping for ipsets/aliases

Leo Nunner l.nunner at proxmox.com
Wed Jun 7 12:17:47 CEST 2023


This patch introduces scoping mechanisms for IPsets and aliases, since
its possible to have two of them with the same name on different layers
(i.e. one on the cluster layer, and one on the VM layer). Datacenter
entries are now prefixed with "dc/", and VM entries are prefixed with
"ct/".

The first two patches:

  fix #4556: introduce 'dc' and 'vm' prefix for IPSets
  fix #4556: introduce 'dc' and 'vm' prefix for aliases

should retain backwards compatibility with existing setups. All older
configs will continue to work as previously, since unscoped values
retain the previous behaviour.

  fix #4556: api: return scoped IPSets and aliases
  firewall: add scope field to IPRefSelector

introduce new return values to the API endpoints for /refs, leading to
all new entries that are being added via the GUI being scoped by
default. This will break compatibility with older systems, since the
scoped values cannot be parsed.

firewall:

Leo Nunner (3):
  fix #4556: introduce 'dc' and 'vm' prefix for IPSets
  fix #4556: introduce 'dc' and 'vm' prefix for aliases
  fix #4556: api: return scoped IPSets and aliases

 src/PVE/API2/Firewall/Cluster.pm | 34 ++-------------
 src/PVE/API2/Firewall/IPSet.pm   |  9 ++--
 src/PVE/API2/Firewall/VM.pm      | 47 +++++----------------
 src/PVE/Firewall.pm              | 71 +++++++++++++++++++++-----------
 src/PVE/Firewall/Helpers.pm      | 43 +++++++++++++++++++
 5 files changed, 110 insertions(+), 94 deletions(-)

manager:

Leo Nunner (1):
  firewall: add scope field to IPRefSelector

 www/manager6/form/IPRefSelector.js | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

-- 
2.30.2






More information about the pve-devel mailing list