[client] Fix multiple peer name filtering in netbird status command#2798
Merged
Conversation
pascal-fischer
previously approved these changes
Oct 28, 2024
|
pascal-fischer
approved these changes
Oct 28, 2024
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 ...
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.



Describe your changes
Issue ticket number and link
Checklist
Description
The current implementation of peer name filtering in the
skipDetailByFiltersfunction has a logic issue that prevents filtering by multiple peer names. This PR fixes the issue by:Changing the initial value of
nameEvaltotrue(meaning skip by default)Inverting the logic to look for matches instead of non-matches
Setting
nameEval = falsewhen a match is found (meaning don't skip)Before the fix:
--filter-by-names peer-01,peer-02.netbird.cloud, the command would fail to show both peers because:After the fix:
nameEval = true(skip by default)nameEvalis set to falseExample:
Bash
Now correctly shows both peers that match either name.
Testing:
This fix maintains compatibility with existing functionality while correctly implementing the intended multiple peer name filtering behavior.