Dot11 Reason Codes are off-by-one from 802.11 spec
- Dominant language
- Go
- Stars
- 6.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
gopacket version: 1.1.18
Comparing [gopacket/layers's Dot11 deauth reason codes](https://github.com/google/gopacket/blob/074336d2d31c38718be0b10713b8e3302e0a6c34/layers/dot11.go#L98-L113) with several sources from a quick Google search ([1](https://www.cisco.com/assets/sol/sb/WAP371_Emulators/WAP371_Emulator_v1-0-1-5/help/Apx_ReasonCodes2.html), [2](https://blogs.arubanetworks.com/industries/802-11-reason-codes-and-status-codes/), [3](https://support.google.com/chrome/a/answer/7172038?hl=en), [4](https://patchwork.kernel.org/patch/3592641/)), it appears the definitions in gopacket are offset by one.
gopacket's definitions start with `Dot11ReasonReserved = 1`, while as far as I can tell `0` is in fact reserved. The offset continues down the list: gopacket lists `Dot11ReasonUnspecified = 2`, while according to all sources I can find `1` in fact means `Unspecified`, and so on.
Contributor guide
Assessment
This issue has not been assessed yet.