Repository navigation
fix(dot11r): drop duplicate json mac tag so the BSSID serializes - #1395
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem (#1391)
Dot11rIfacein adapters/types.go had two fields with the same JSON tag: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 vetflagged it asstruct 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
"mac":"AA:BB:..."; full server suite green;go vetclean of the duplicate-tag warning.Closes #1391