tools: Fix filtering by mount namespace
authorMauricio Vásquez <mauricio@kinvolk.io>
Fri, 16 Jul 2021 21:55:36 +0000 (16:55 -0500)
committeryonghong-song <ys114321@gmail.com>
Sat, 17 Jul 2021 18:19:48 +0000 (11:19 -0700)
commitef330a393be4b472627b1bfa7fbe50934e519e25
tree119d156d6bf407bde85cf5f205aa6ed363fd56bd
parentb05764161d6e6c5c069be16322668dc1a7b573e4
tools: Fix filtering by mount namespace

The filtering by mount namespace implementation relies on the
redefinition of the "struct mnt_namespace" internal kernel structure.
The layout of this structure changed in Linux 5.11 (https://github.com/torvalds/linux/commit/1a7b8969e664d6af328f00fe6eb7aabd61a71d13),
this commit adds a conditional on the kernel version to adapt to this
change.

Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
src/python/bcc/containers.py