Skip to content

fix: reject invalid network ls filters - #5226

Merged
AkihiroSuda merged 1 commit into
containerd:mainfrom
immanuwell:fix/network-ls-invalid-filters
Oct 5, 2026
Merged

AkihiroSuda merged 1 commit into
containerd:mainfrom
immanuwell:fix/network-ls-invalid-filters

Conversation

@immanuwell

@immanuwell immanuwell commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

network ls --filter names=missing lists every configured network

This rejects unknown keys and filters without =, valid name and label filters still work

Repro with CNI plugins installed:

nerdctl network create repro-net
nerdctl network ls --filter names=missing

Before: lists repro-net. After: exits with invalid filter 'names'

Tested: make test-unit and golangci-lint run ./pkg/cmd/network/...

Comment thread pkg/cmd/network/list_test.go Resolved
Signed-off-by: Immanuel Tikhonov <pchpr.00@list.ru>
@immanuwell
immanuwell force-pushed the fix/network-ls-invalid-filters branch from 279910b to 379ca06 Compare September 29, 2026 16:40
@immanuwell

immanuwell commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor Author

@haytok added driver filter support and tests, how does it look now?

@immanuwell
immanuwell requested a review from haytok September 29, 2026 16:42

@haytok haytok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@haytok
haytok requested a review from AkihiroSuda October 5, 2026 16:25
@AkihiroSuda AkihiroSuda added this to the v2.5.0 (tentative) milestone Oct 5, 2026

@AkihiroSuda AkihiroSuda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda
AkihiroSuda merged commit add5132 into containerd:main Oct 5, 2026
44 of 52 checks passed
@AkihiroSuda AkihiroSuda modified the milestones: v2.5.0 (tentative), v2.4.2 Oct 9, 2026
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