Skip to content

fix(dot11r): drop duplicate json mac tag so the BSSID serializes - #1395

Merged
gnacho merged 1 commit into
mainfrom
fix/1391-dot11r-mac-tag
Oct 13, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/1391-dot11r-mac-tag

Conversation

@gnacho

@gnacho gnacho commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Problem (#1391)

Dot11rIface in adapters/types.go had two fields with the same JSON tag:

MAC string `json:"mac"`
Mac string `json:"mac"`

With encoding/json, ambiguous duplicate tags mean neither field serializes: the BSSID never reached the wire and the 802.11r table on the Roaming page always showed "-" in its MAC column. go vet flagged it as struct field Mac repeats json tag "mac".

Fix

Removed the dead mixed-case field (a rename leftover; every consumer uses MAC). Added a serialization regression test so the tag cannot silently break again.

Verification

  • New test proves the BSSID marshals as "mac":"AA:BB:..."; full server suite green; go vet clean of the duplicate-tag warning.

Closes #1391

Dot11rIface had both MAC and Mac fields with the same json tag, a leftover
from a rename. encoding/json silently drops ambiguous duplicates, so the
BSSID never reached the wire and the 802.11r table (Roaming page) always
showed '-' in its MAC column. go vet flagged it as 'repeats json tag'.

The mixed-case field was dead code (everyone uses MAC); removed. New
serialization regression test.

Closes #1391
@gnacho
gnacho merged commit 96ec5e5 into main Oct 13, 2026
2 checks passed
@gnacho
gnacho deleted the fix/1391-dot11r-mac-tag branch October 13, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate json tag mac (MAC/Mac fields) in adapters/types.go silently drops the field

1 participant