Q7-Add vendor IE

  • In this section, you are going to learn

  • How to add vendor ie in beacons, probe-response, assoc-response similar to ssid ie

#

Version

Ubuntu

Ubuntu 22.04 64 bit

Linux Kernel

6.9.2

Supplicant

wpa_supplicant 2.10

Hostapd

hostapd 2.10

  • Add vendor IE in Beacons, Probe-Response, Assoc-Response similar to SSID IE

  • Callflow for add vendor ie in beacons

ieee80211_beacon_get_tim
    __ieee80211_beacon_get
	ieee80211_beacon_get_ap
	     drv_add_vendor_ie
  • Callflow for add vendor ie in probe-response, assoc-response

ieee80211_mgmt_tx
   ieee80211_tx_skb_tid
       __ieee80211_tx_skb_tid_band
           ieee80211_xmit
	       ieee80211_tx
                   drv_add_vendor_ie
  • Download the below patch file

add_vendor_ie_in_beacons_prob_assoc_res.patch

test:~$ pwd
/home/test/
test:~$ cd linux-6.9.2/
  • Note : Your present working directory should be linux-6.9.2

test:~$ pwd
/home/test/linux-6.9.2/
  • Remove mac80211 module

test:~$ sudo systemctl stop NetworkManager.service

test:~$ sudo rmmod mac80211
  • Run the below command to apply patch

test:~$ sudo patch -p1 < add_vendor_ie_in_beacons_prob_assoc_res.patch
patching file net/mac80211/ieee80211_i.h
patching file net/mac80211/link.c
patching file net/mac80211/mac80211.mod.c
patching file net/mac80211/mlme.c
patching file net/mac80211/rx.c
patching file net/mac80211/tx.c
patching file net/mac80211/util.c
  • Compile mac80211 folder

test:~$ sudo make -C . M=net/mac80211/
  • Insert mac80211 module

test:~$ sudo insmod ./net/mac80211/mac80211.ko
  • Download file to check wireshark output

add_vendor_ie_in_beacons_prob_assoc_res.pcapng

  • Check for beacon packet

  • Click on packet No.2 as shown in the image below

Diagram
  • Click on IEEE 802.11 Wireless Management

  • Click on Tagged parameters

  • Click on Tag: Vendor Specific: Power R, Inc.

Diagram
  • Check for probe-response packet

  • Click on packet No.72 as shown in the image below

Diagram
  • Click on IEEE 802.11 Wireless Management

  • Click on Tagged parameters

  • Click on Tag: Vendor Specific: Power R, Inc.

Diagram
  • Check for association response packet

  • Click on packet No.150 as shown in the image below

Diagram
  • Click on IEEE 802.11 Wireless Management

  • Click on Tagged parameters

  • Click on Tag: Vendor Specific: Power R, Inc.

Diagram