diff options
| author | Jo-Philipp Wich | 2022-05-30 18:44:17 +0000 |
|---|---|---|
| committer | Jo-Philipp Wich | 2022-05-30 18:44:17 +0000 |
| commit | 6dd26176b684de6e16296d78660f35fe5c150e8d (patch) | |
| tree | 408cf746acc85dcea66aef5b99f3e3a772727094 | |
| parent | c7c9c84b2fcf5c3b122e5072b9976744d6c70382 (diff) | |
| download | firewall4-6dd26176b684de6e16296d78660f35fe5c150e8d.tar.gz | |
fw4: fix logic flaw in testing hw flow offloading support
The revised logic failed to account for cases where zero offload capable
devices where resolved, in this case the capability check was not performed
at all.
Fixes: #9935
Fixes: 57984e0 ("fw4: always resolve lower flowtable devices")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
| -rw-r--r-- | root/usr/share/ucode/fw4.uc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc index 02341cb..be347d7 100644 --- a/root/usr/share/ucode/fw4.uc +++ b/root/usr/share/ucode/fw4.uc @@ -462,17 +462,15 @@ return { for (let device in zone.related_physdevs) push(devices, ...resolve_lower_devices(devstatus, device, true)); - if (length(devices)) { - devices = sort(uniq(devices)); + devices = sort(uniq(devices)); - if (nft_try_hw_offload(devices)) - return devices; + if (length(devices) && nft_try_hw_offload(devices)) + return devices; - this.warn('Hardware flow offloading unavailable, falling back to software offloading'); - this.state.defaults.flow_offloading_hw = false; + this.warn('Hardware flow offloading unavailable, falling back to software offloading'); + this.state.defaults.flow_offloading_hw = false; - devices = []; - } + devices = []; } for (let zone in this.zones()) |