Skip to content

Commit

Permalink
fw4: skip not existing netdev names in flowtable device list
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jow- committed Jun 3, 2024
1 parent e009588 commit dfbcc1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion root/usr/share/ucode/fw4.uc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit dfbcc1c

Please sign in to comment.