diff options
Diffstat (limited to 'src/firemon')
-rw-r--r-- | src/firemon/netstats.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/firemon/netstats.c b/src/firemon/netstats.c index 3b6c128ae..89e4202bd 100644 --- a/src/firemon/netstats.c +++ b/src/firemon/netstats.c | |||
@@ -117,8 +117,14 @@ static void print_proc(int index, int itv, int col) { | |||
117 | } | 117 | } |
118 | else | 118 | else |
119 | ptrcmd = cmd; | 119 | ptrcmd = cmd; |
120 | // if the command doesn't have a --net= option, don't print | 120 | |
121 | if (strstr(ptrcmd, "--net=") == NULL) { | 121 | // check network namespace |
122 | char *name; | ||
123 | if (asprintf(&name, "/run/firejail/network/%d-netmap", index) == -1) | ||
124 | errExit("asprintf"); | ||
125 | struct stat s; | ||
126 | if (stat(name, &s) == -1) { | ||
127 | // the sandbox doesn't have a --net= option, don't print | ||
122 | if (cmd) | 128 | if (cmd) |
123 | free(cmd); | 129 | free(cmd); |
124 | return; | 130 | return; |