]> git.proxmox.com Git - mirror_iproute2.git/commit
ss: add checks for bc filter support
authorDmitry Yakunin <zeil@yandex-team.ru>
Sat, 9 May 2020 16:52:02 +0000 (19:52 +0300)
committerDavid Ahern <dsahern@gmail.com>
Wed, 13 May 2020 14:28:38 +0000 (14:28 +0000)
commit7bd9188581aa8abd644d45a990529a92efe50255
treede79c1cc700bf68ee8436838ec8eb7ac4a13a0a6
parent14f4bda590447179e2b338c6e494658d2f737e6e
ss: add checks for bc filter support

As noted by David Ahern, now if some bytecode filter is not supported
by running kernel printed error message is not clear. This patch is attempt to
detect such case and print correct message. This is done by providing checking
function for new filter types. As example check function for cgroup filter
is implemented. It sends correct lightweight request (idiag_states = 0)
with zero cgroup condition to the kernel and checks returned errno. If filter
is not supported EINVAL is returned. Result of checking is cached to
avoid extra checks if several same filters are specified.

Signed-off-by: Dmitry Yakunin <zeil@yandex-team.ru>
Signed-off-by: David Ahern <dsahern@gmail.com>
misc/Makefile
misc/ss.c
misc/ss_util.h [new file with mode: 0644]
misc/ssfilter.h
misc/ssfilter.y
misc/ssfilter_check.c [new file with mode: 0644]