[Bug 215301] ifconfig list scan still abbreviates some SSID in -v mode
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Dec 14 12:43:39 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215301
Bug ID: 215301
Summary: ifconfig list scan still abbreviates some SSID in -v
mode
Product: Base System
Version: 11.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: wireless
Assignee: freebsd-wireless at FreeBSD.org
Reporter: ms-freebsd-bugzilla at stoffnet.at
A SSID with the maximum length of 32 characters will be abbreviated by "list
scan", even when in verbose mode (using "-v" switch) (BSSID changed for
privacy):
> ifconfig -v wlan0 list scan
SSID/MESH ID BSSID CHAN RATE S:N INT
DIRECT-88-HP DeskJet 3630 se... fc:3f:db:ff:ff:ff 1 54M -87:-95 100
This is because list_scan() assumes the maximum SSID length (ssidmax) to be
"IEEE80211_NWID_LEN - 1" in verbose mode. Changing this to "IEEE80211_NWID_LEN"
will lead to the expected behavior of displaying the full SSID:
> ifconfig -v wlan0 list scan
SSID/MESH ID BSSID CHAN RATE S:N INT
DIRECT-88-HP DeskJet 3630 series fc:3f:db:ff:ff:ff 1 54M -87:-95 100
This change should be safe, as the "ssid" variable, which is used to store that
value, is already initialized with the correct size (IEEE80211_NWID_LEN+1).
Here is a unified diff with my suggested fix:
--- sbin/ifconfig/ifieee80211.c.orig 2016-12-14 13:12:15.883264000 +0100
+++ sbin/ifconfig/ifieee80211.c 2016-12-14 13:12:36.495865000 +0100
@@ -3311,7 +3311,7 @@
getchaninfo(s);
- ssidmax = verbose ? IEEE80211_NWID_LEN - 1: 14;
+ ssidmax = verbose ? IEEE80211_NWID_LEN: 14;
printf("%-*.*s %-17.17s %4s %4s %-7s %3s %4s\n"
, ssidmax, ssidmax, "SSID/MESH ID"
, "BSSID"
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-wireless
mailing list