]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
wifi-scripts: ucode: fix check for empty crypto object while scanning 20526/head
authorLeon M. Busch-George <leon@georgemail.eu>
Fri, 24 Oct 2025 09:54:52 +0000 (11:54 +0200)
committerRobert Marko <robimarko@gmail.com>
Mon, 27 Oct 2025 13:22:58 +0000 (14:22 +0100)
it can be empty

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Link: https://github.com/openwrt/openwrt/pull/20526
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/network/config/wifi-scripts/files-ucode/usr/bin/iwinfo

index 204a6e5b308f34e287cfbb150433555af6dcc0da..b3a04e8390301fbd0354ed740fe9d5e904564880 100755 (executable)
@@ -72,7 +72,7 @@ function print_scan(cells) {
                printf('\t  Mode: %s  Frequency: %s GHz  Band: %s GHz  Channel: %d\n', cell.mode, cell.frequency, cell.band, cell.channel);
                printf('\t  Signal: %d dBm  Quality: %2d/70\n', cell.dbm, cell.quality);
 
-               if (!length(cell.crypto.key_mgmt))
+               if (!cell.crypto || !length(cell.crypto.key_mgmt))
                        printf('\t  Encryption: NONE\n');
                else
                        printf('\t  Encryption: %s (%s)\n', join(' / ', cell.crypto.key_mgmt), join(' / ', cell.crypto.pair));