public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH firewall/proxmox{-ve-rs,-firewall} 0/7] firewall: handle guest network devices without a MAC address
Date: Tue, 24 Nov 2026 18:57:10 +0100	[thread overview]
Message-ID: <20261124175718.512428-1-s.hanreich@proxmox.com> (raw)

A guest network device without a MAC address is valid for qemu-server
and pve-container, which generate a random one each time they parse the
device. The API always stores one, but manual edits and restored
backups are accepted without any MAC or type set.

pve-firewall built its MAC and IP filters from random addresses, a
different one for each rule and on every compile. With the MAC filter
enabled, it thus dropped all traffic the device sent, and the IP filter
dropped traffic from its link-local addresses. (unless you were really
lucky).

proxmox-firewall failed to parse such a guest's network config
completely.

Both firewalls now drop the traffic of a device without MAC address
explicitly if the MAC filter is enabled. and the IP filter drops its
auto-derived link-local addresses. That keeps the effective behavior
of pve-firewall, with stable rules, and proxmox-firewall behaves the
same.

## Dependencies
pve-firewall requires pve-container from my other patch series [1]
proxmox-firewall requires proxmox-ve-rs

semver: ve-rs change breaks the public API


[1] https://lore.proxmox.com/pve-devel/20261124145651.335234-1-s.hanreich@proxmox.com/T/#t


proxmox-ve-rs:

Stefan Hanreich (3):
  ve-config: guest: require the name of container network devices
  ve-config: guest: default the type of container network devices to
    veth
  ve-config: guest: accept network devices without a MAC address

 proxmox-ve-config/src/guest/vm.rs | 99 ++++++++++++++++++++++++-------
 1 file changed, 79 insertions(+), 20 deletions(-)


proxmox-firewall:

Stefan Hanreich (2):
  firewall: guest: handle network devices without a MAC address
  tests: add network devices without MAC address

 proxmox-firewall/src/firewall.rs              |  38 +-
 proxmox-firewall/tests/input/100.conf         |   1 +
 proxmox-firewall/tests/input/101.conf         |   1 +
 .../integration_tests__firewall.snap          | 399 ++++++++++++++++++
 4 files changed, 429 insertions(+), 10 deletions(-)


pve-firewall:

Stefan Hanreich (2):
  firewall: drop the traffic of guest network devices without MAC
    address
  firewall: do not generate MAC addresses for guest network devices

 src/PVE/Firewall.pm | 46 +++++++++++++++++++++++----------------------
 1 file changed, 24 insertions(+), 22 deletions(-)


Summary over all repositories:
  6 files changed, 532 insertions(+), 52 deletions(-)

-- 
Generated by murpp 0.12.0




             reply	other threads:[~2026-11-24 17:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 17:57 Stefan Hanreich [this message]
2026-11-24 17:57 ` [PATCH proxmox-ve-rs 1/7] ve-config: guest: require the name of container network devices Stefan Hanreich
2026-11-24 17:57 ` [PATCH proxmox-ve-rs 2/7] ve-config: guest: default the type of container network devices to veth Stefan Hanreich
2026-11-24 17:57 ` [PATCH proxmox-ve-rs 3/7] ve-config: guest: accept network devices without a MAC address Stefan Hanreich
2026-11-24 17:57 ` [PATCH proxmox-firewall 4/7] firewall: guest: handle " Stefan Hanreich
2026-11-25  7:28   ` Arthur Bied-Charreton
2026-11-24 17:57 ` [PATCH proxmox-firewall 5/7] tests: add network devices without " Stefan Hanreich
2026-11-24 17:57 ` [PATCH pve-firewall 6/7] firewall: drop the traffic of guest " Stefan Hanreich
2026-11-24 17:57 ` [PATCH pve-firewall 7/7] firewall: do not generate MAC addresses for guest network devices Stefan Hanreich
2026-11-25  7:14 ` [PATCH firewall/proxmox{-ve-rs,-firewall} 0/7] firewall: handle guest network devices without a MAC address Arthur Bied-Charreton

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=20261124175718.512428-1-s.hanreich@proxmox.com \
    --to=s.hanreich@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