Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[management] Fix peer meta isEqual #2807

Merged
merged 1 commit into from
Oct 29, 2024
Merged

[management] Fix peer meta isEqual #2807

merged 1 commit into from
Oct 29, 2024

Conversation

pascal-fischer
Copy link
Contributor

Describe your changes

The peer meta is equal function was not checking slices in any order. Since the order of elements in a slice in go is not always predictable. THis was causing the Sync and Login methods to write new meta even though the arrey itself was the same, just a different order. The new meta also caused network map updates for the account peers.

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

Copy link

@mlsmaycon mlsmaycon merged commit 39c9978 into main Oct 29, 2024
21 checks passed
@mlsmaycon mlsmaycon deleted the fix/meta-equal branch October 29, 2024 18:54
hurricanehrndz added a commit to hurricanehrndz/netbird that referenced this pull request Nov 5, 2024
…te_change

* upstream/main: (81 commits)
  Fix cached device flow oauth (netbirdio#2833)
  Avoid failing all other matrix tests if one fails (netbirdio#2839)
  add all group to add peer affected peers network map check (netbirdio#2830)
  [client] Log windows panics (netbirdio#2829)
  Fix unused servers cleanup (netbirdio#2826)
  [management] Add DB access duration to logs for context cancel (netbirdio#2781)
  Allocate new buffer for every package (netbirdio#2823)
  [client] Nil check on ICE remote conn (netbirdio#2806)
  [management] remove network map diff calculations (netbirdio#2820)
  Create FUNDING.yml (netbirdio#2814)
  Create funding.json (netbirdio#2813)
  [management] add metrics to network map diff (netbirdio#2811)
  [client] Fix the broken dependency gvisor.dev/gvisor (netbirdio#2789)
  fix meta is equal slices (netbirdio#2807)
  [client] Fix multiple peer name filtering in netbird status command (netbirdio#2798)
  [management] Setup key improvements (netbirdio#2775)
  [client] allow relay leader on iOS (netbirdio#2795)
  [client] Remove legacy forwarding rules in userspace mode (netbirdio#2782)
  [client] Ignore route rules with no sources instead of erroring out (netbirdio#2786)
  [misc] Update Zitadel from v2.54.10 to v2.64.1
  ...
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.

3 participants