summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich2024-06-03 14:49:40 +0000
committerJo-Philipp Wich2024-06-03 14:49:40 +0000
commitdfbcc1cd127c78fc61bb870d36d2512b571d223b (patch)
tree29921e1d8b41a42f3322d148e143da06c090da11
parente00958884416f59b273595f941d198de63acc1dd (diff)
downloadfirewall4-dfbcc1cd127c78fc61bb870d36d2512b571d223b.tar.gz
fw4: skip not existing netdev names in flowtable device list
In case interface configurations are present which refer to not existing network devices, such device names might end up in the flowtable list, leading to `No such file or directory` errors when attempting to load the resulting ruleset. Solve this issue by testing for each netdev name whether it refers to an existing device. Fixes: e009588 ("fw4: do not add physical devices for soft offload") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--root/usr/share/ucode/fw4.uc4
1 files changed, 3 insertions, 1 deletions
diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc
index ffea2eb..2d77146 100644
--- a/root/usr/share/ucode/fw4.uc
+++ b/root/usr/share/ucode/fw4.uc
@@ -547,7 +547,9 @@ return {
devices = [];
for (let zone in this.zones())
- push(devices, ...zone.related_physdevs);
+ for (let device in zone.related_physdevs)
+ if (fs.access(`/sys/class/net/${device}`))
+ push(devices, device);
devices = sort(uniq(devices));
}