beacon/proberesp/assocresp_ie have nothing to do with acutal frame?

Jouni Malinen j at w1.fi
Sun Feb 5 03:07:37 PST 2017


On Wed, Feb 01, 2017 at 04:03:25PM +0900, Jeon wrote:
> I am trying to put my own vendor specific Information Element (IE) to
> beacon and probe response frames.
> 
> With some investingation, I've found that
> `ieee802_11_build_ap_params()` in `beacon.c` and
> `hostapd_build_ap_extra_ies()` in `ap_drv_opc.c` are relevant to what
> I am looking for.
> 
> First, I've implemented code putting my own IE in
> `hostapd_build_ap_extra_ies()` and checked that `beacon_ies` contains
> my own IE:
> 
> > $ sudo ./hostapd hostapd.conf -dd
> > ...
> > nl80211: beacon_ies - hexdump(len=13) 7f 08 00 00 00 00 00 00 00 40 ff 01 01
> > nl80211: proberesp_ies - hexdump(len=13) 7f 08 00 00 00 00 00 00 00 40 ff 01 01
> > nl80211: assocresp_ies - hexdump(len=10) 7f 08 00 00 00 00 00 00 00 40
> > ...
> 
> The last 3 octets (`ff 01 01`) are added IE.

Using 0xff as the extension ID for some custom stuff is a very bad
idea.. That value has been assigned for WLAN_EID_EXTENSION and this
example here would conflict with that assignment and can result in
unexpected behavior..

> However, when I capture
> beacon frames and probe response frames via Wireshark, the added IE
> did not appear.

It would sound like the driver you are using does not use these values.
I would recommend using the hostapd.conf vendor_elements parameter to
add extra IEs since that gets added to all the needed places regardless
of which driver is used. If those values do not show up in a sniffer,
the driver in question does not support addition of IEs from hostapd.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list