diff options
| author | John Crispin | 2025-05-28 13:44:13 +0000 |
|---|---|---|
| committer | John Crispin | 2025-05-28 13:44:13 +0000 |
| commit | 0badba1191f214f355524fbbdaa1f3b96a624c57 (patch) | |
| tree | 15d11bf70e2d2e0a145dc34c6f45e9bf1bb18f06 | |
| parent | 4536dd8e3719b2898f6fc7e24f60e8e3c1631193 (diff) | |
| download | ufp-0badba1191f214f355524fbbdaa1f3b96a624c57.tar.gz | |
fix cross matching of weights
Signed-off-by: John Crispin <john@phrozen.org>
| -rwxr-xr-x | ufpd | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -242,13 +242,18 @@ function __device_match_list(mac, devices) let cur = match_devs[j]; let cur_data = cur[0]; + let data_match; for (let key in cur_data) { - if (lc(match_data[key]) == lc(cur_data[key])) { - match_weight += cur[1]; - push(match_fp, cur[2]); + data_match ??= true; + if (lc(match_data[key]) != lc(cur_data[key])) { + data_match = false; break; } } + if (data_match) { + match_weight += cur[1]; + push(match_fp, cur[2]); + } } for (let key in match_data) { |