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>
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));
}