Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Oct 2021 11:28:21 +0000
From:      bugzilla-noreply@freebsd.org
To:        wireless@FreeBSD.org
Subject:   [Bug 259003] "ifconfig list scan" can terminate early, before scan ends
Message-ID:  <bug-259003-21060@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 259003
           Summary: "ifconfig list scan" can terminate early, before scan
                    ends
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: wireless
          Assignee: wireless@FreeBSD.org
          Reporter: bsdpr@phoe.frmug.org

On hosts equipped with more than one Wi-Fi interfaces it is possible that=20
"ifconfig list scan" does not wait for the actual completion of the scan and
attempt to display incomplete results.

In scan_and_wait() (located in ifieee80211.c), the reception of a
RTM_IEEE80211_SCAN message is awaited. This loop can terminate early because
the interface this message is related to is not checked.

I recommend to change

                } while (rtm->rtm_type !=3D RTM_IEEE80211 ||
                         ifan->ifan_what !=3D RTM_IEEE80211_SCAN);

to

                } while (rtm->rtm_type !=3D RTM_IEEE80211 ||
                         strcmp(ifan->ifan_name, name)!=3D0 ||
                         ifan->ifan_what !=3D RTM_IEEE80211_SCAN);

This bug is present from 11 (at least) to current.

--=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-259003-21060>