[pve-devel] [PATCH proxmox-firewall 3/3] guest: match arp packets via meta
Stefan Hanreich
s.hanreich at proxmox.com
Wed Jul 3 11:17:12 CEST 2024
When matching via ether type, VLAN packets are not matched. This can
cause ARP packets encapsulated in VLAN frames to be dropped.
Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
proxmox-firewall/src/firewall.rs | 2 +-
.../tests/snapshots/integration_tests__firewall.snap | 10 ++++------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/proxmox-firewall/src/firewall.rs b/proxmox-firewall/src/firewall.rs
index 4ea81df..941aa20 100644
--- a/proxmox-firewall/src/firewall.rs
+++ b/proxmox-firewall/src/firewall.rs
@@ -538,7 +538,7 @@ impl Firewall {
// we allow outgoing ARP, except if blocked by the MAC filter above
let arp_rule = vec![
- Match::new_eq(Payload::field("ether", "type"), Expression::from("arp")).into(),
+ Match::new_eq(Meta::new("protocol"), Expression::from("arp")).into(),
Statement::make_accept(),
];
diff --git a/proxmox-firewall/tests/snapshots/integration_tests__firewall.snap b/proxmox-firewall/tests/snapshots/integration_tests__firewall.snap
index e1953e0..40d4405 100644
--- a/proxmox-firewall/tests/snapshots/integration_tests__firewall.snap
+++ b/proxmox-firewall/tests/snapshots/integration_tests__firewall.snap
@@ -2961,9 +2961,8 @@ expression: "firewall.full_host_fw().expect(\"firewall can be generated\")"
"match": {
"op": "==",
"left": {
- "payload": {
- "protocol": "ether",
- "field": "type"
+ "meta": {
+ "key": "protocol"
}
},
"right": "arp"
@@ -3623,9 +3622,8 @@ expression: "firewall.full_host_fw().expect(\"firewall can be generated\")"
"match": {
"op": "==",
"left": {
- "payload": {
- "protocol": "ether",
- "field": "type"
+ "meta": {
+ "key": "protocol"
}
},
"right": "arp"
--
2.39.2
More information about the pve-devel
mailing list