Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2016 12:43:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-wireless@FreeBSD.org
Subject:   [Bug 215301] ifconfig list scan still abbreviates some SSID in -v mode
Message-ID:  <bug-215301-21060@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215301

            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@FreeBSD.org
          Reporter: ms-freebsd-bugzilla@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     I=
NT
DIRECT-88-HP DeskJet 3630 series  fc:3f:db:ff:ff:ff    1   54M  -87:-95   1=
00


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 =3D verbose ? IEEE80211_NWID_LEN - 1: 14;
+       ssidmax =3D verbose ? IEEE80211_NWID_LEN: 14;
        printf("%-*.*s  %-17.17s  %4s %4s   %-7s  %3s %4s\n"
                , ssidmax, ssidmax, "SSID/MESH ID"
                , "BSSID"

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-215301-21060>