summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netsniff-ng.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 25f59ac..c1e0d26 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -1384,11 +1384,13 @@ int main(int argc, char **argv)
init_geoip(0);
if (setsockmem)
set_system_socket_memory(vals, array_size(vals));
- xlockme();
+ if (!ctx.enforce)
+ xlockme();
main_loop(&ctx);
- xunlockme();
+ if (!ctx.enforce)
+ xunlockme();
if (setsockmem)
reset_system_socket_memory(vals, array_size(vals));
destroy_geoip();