]>
git.ipfire.org Git - thirdparty/iproute2.git/commit
ip: filter by group before printing
Filter the output using the requested group, if necessary.
This avoids to print an empty JSON object for each existing item
not matching the group filter when the --json option is used.
Before:
$ ip --json address list group test
[{},{},{},{},{},{},{},{},{},{},{},{}]
After:
$ ip --json address list group test
[]
Signed-off-by: Jean Thomas <jean.thomas@wifirst.fr>
Signed-off-by: David Ahern <dsahern@kernel.org>