[openwrt/openwrt] wifi-scripts: ucode: fix check for empty crypto object while scanning

LEDE Commits lede-commits at lists.infradead.org
Mon Oct 27 06:23:01 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/66e5e9671f8c02319109ba3391e355ccce98003f

commit 66e5e9671f8c02319109ba3391e355ccce98003f
Author: Leon M. Busch-George <leon at georgemail.eu>
AuthorDate: Fri Oct 24 11:54:52 2025 +0200

    wifi-scripts: ucode: fix check for empty crypto object while scanning
    
    it can be empty
    
    Signed-off-by: Leon M. Busch-George <leon at georgemail.eu>
    Link: https://github.com/openwrt/openwrt/pull/20526
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/network/config/wifi-scripts/files-ucode/usr/bin/iwinfo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/bin/iwinfo b/package/network/config/wifi-scripts/files-ucode/usr/bin/iwinfo
index 204a6e5b30..b3a04e8390 100755
--- a/package/network/config/wifi-scripts/files-ucode/usr/bin/iwinfo
+++ b/package/network/config/wifi-scripts/files-ucode/usr/bin/iwinfo
@@ -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));




More information about the lede-commits mailing list