From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
To: Stefan Hanreich <s.hanreich@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-firewall 4/7] firewall: guest: handle network devices without a MAC address
Date: Wed, 25 Nov 2026 08:28:29 +0100 [thread overview]
Message-ID: <n5llo2uqmtbmb3bdauwxw57nb3u5jf5u3rzgahz5onb6cdpl7l@ko3z6fdapsew> (raw)
In-Reply-To: <20261124175718.512428-5-s.hanreich@proxmox.com>
On Tue, Nov 24, 2026 at 06:57:14PM +0100, Stefan Hanreich wrote:
> A guest network device can lack a MAC address, for example after a
> manual edit of the config. qemu-server and pve-container then use a
> random one, which the firewall cannot know. Such a guest failed the
> parsing of its network config, and with it the whole firewall update.
>
> Leave the device out of the MAC filter, so that the filter drops its
> traffic, like it drops the traffic from any other unknown MAC address.
> If none of the devices of a guest has a MAC address, there is no set
> to match against, so drop all traffic of the guest instead of skipping
> the filter. Likewise, leave the link-local address out of the default
> IP filter, which then drops traffic from link-local addresses of the
> device.
>
> pve-firewall effectively behaves the same, as it builds the filters
> from a random MAC address that does not match the one of the guest.
>
[snip]
> + let mac_address_set: Vec<Expression> = firewall_devices
> + .iter()
> + .filter_map(|(index, device)| {
> + let Some(mac_address) = device.mac_address() else {
> + log::warn!(
> + "guest #{vmid}: net{index} has no MAC address, the MAC filter drops \
> + its traffic"
> + );
this warning gets logged every 5 seconds for each such device. since
rules are compiled for stopped guests as well it can keep going for a
while.
pve-firewall handles the same case silently. i think a warning is good
but maybe we could do it once per device? not a blocker & fine as a
follow-up/future refactor though imo.
[snip]
next prev parent reply other threads:[~2026-11-25 7:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 17:57 [PATCH firewall/proxmox{-ve-rs,-firewall} 0/7] firewall: handle guest network devices without a MAC address Stefan Hanreich
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 [this message]
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=n5llo2uqmtbmb3bdauwxw57nb3u5jf5u3rzgahz5onb6cdpl7l@ko3z6fdapsew \
--to=a.bied-charreton@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=s.hanreich@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