On Fri, Jul 26, 2019 at 01:53:04PM +0200, Péter Bertalan Zoltán wrote: > On 2019-07-26, Stefan Sperling wrote: > > Internally to net80211, there are two channels: The 'default' channel > > (referred to as "ic_ibss_chan" in source code) and the 'desired' > > channel (referred to as "ic_des_chan" in source code). > > > > The default channel is initialized when the driver attaches (usually > > to channel 1). Monitor mode uses this default channel, which you've > > modified while the interface was in monitor mode. > > ifconfig shows this channel while the interface is down. > > > > Furthermore, the channel for each known AP is stored alongside other > > data such as the AP's SSID. While the interface is up, ifconfig shows > > the channel of the currently selected AP. This selection is ineffective > > in monitor mode because no connection to any AP is initiated, but data > > from the previous connection is still there and is being displayed. > > So as far as I understand, when I issued > # ifconfig iwn0 mediaopt monitor chan 4 > I have modified the *default channel*, which monitor mode uses? And in > monitor mode, what `ifconfig iwn0` shows as the AP (after 'ieee80211:') > can be disregarded, including the channel, because those settings are > ineffective in monitor mode?
Yes. What ifconfig shows you here is bogus. > But this would mean that the interface is indeed set to use channel 4, > as desired. However: > > ---snip--- > # airodump-ng --channel 4 iwn0 > CH 4 ][ Elapsed: 1 min ][ 2019-07-26 13:48 ][ fixed channel iwn0: 12 > ... > ---snip--- > > Is this an issue with aircrack-ng? Did I misunderstand you? I have no idea what aircrack-ng is doing. You can verify the current channel with: tcpdump -i iwn0 -y IEEE802_11_RADIO This shows the current channel number in radiotap headers, e.g.: ... <radiotap v0, chan 4, 11n, ...> ...