From 102aabe65f0c7ad72e29e193fd81c4c9d05f8a15 Mon Sep 17 00:00:00 2001 From: hanwckf Date: Mon, 14 Oct 2024 00:14:28 +0800 Subject: [PATCH] wireless-tools: fix iwconfig show 32b ssid --- ...7-iwconfig_cannot_show_32_bytes_ssid.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 package/network/utils/wireless-tools/patches/007-iwconfig_cannot_show_32_bytes_ssid.patch diff --git a/package/network/utils/wireless-tools/patches/007-iwconfig_cannot_show_32_bytes_ssid.patch b/package/network/utils/wireless-tools/patches/007-iwconfig_cannot_show_32_bytes_ssid.patch new file mode 100644 index 0000000000..ba3320dc81 --- /dev/null +++ b/package/network/utils/wireless-tools/patches/007-iwconfig_cannot_show_32_bytes_ssid.patch @@ -0,0 +1,19 @@ +diff --git a/iwlib.c b/iwlib.c +index 0afa8c1e..0a9d7259 100644 +--- a/iwlib.c ++++ b/iwlib.c +@@ -707,12 +707,13 @@ iw_get_basic_config(int skfd, + + /* Get ESSID */ + wrq.u.essid.pointer = (caddr_t) info->essid; +- wrq.u.essid.length = IW_ESSID_MAX_SIZE + 1; ++ wrq.u.essid.length = IW_ESSID_MAX_SIZE; + wrq.u.essid.flags = 0; + if(iw_get_ext(skfd, ifname, SIOCGIWESSID, &wrq) >= 0) + { + info->has_essid = 1; + info->essid_on = wrq.u.data.flags; ++ info->essid[IW_ESSID_MAX_SIZE] = '\0'; + } + + /* Get operation mode */