Skip to content

fix: reject invalid network ls filters - #5226

Open
immanuwell wants to merge 1 commit into
containerd:mainfrom
immanuwell:fix/network-ls-invalid-filters
Open

immanuwell wants to merge 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 Outdated
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
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.

2 participants