diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2015-08-02 15:29:09 +0300 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-08-03 10:06:57 +0200 |
commit | bedaa6753463f1c707b42af5f4aac07f1a873525 (patch) | |
tree | 2b01e50dbe7ec862ebe268f8e125623ce6f64f0e | |
parent | 70e61c9c7f1889fd7cc835d042bb8738b79c7288 (diff) |
netsniff-ng: Do not tune socket memory in pcap read-only mode
If a non-privileged user opens a pcap file then netsniff-ng tries to setup
socket memory which causes warnings about failing because of permissions.
So don't tune socket memory in pcap-read-only mode.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r-- | netsniff-ng.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c index efcba74..57edc43 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -1557,6 +1557,7 @@ int main(int argc, char **argv) if (!ops_touched) ctx.pcap = PCAP_OPS_MM; } else { + setsockmem = false; main_loop = read_pcap; if (!ops_touched) ctx.pcap = PCAP_OPS_SG; |