From bfe71705020e238658d391e1c3349dbf25794e9d Mon Sep 17 00:00:00 2001 From: Sudeepta Bhuyan Date: Thu, 16 Jul 2015 17:17:29 +0530 Subject: [PATCH] Fix for segmentation fault #165 --- src/rawsock.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rawsock.c b/src/rawsock.c index 738df380..edbf97bf 100644 --- a/src/rawsock.c +++ b/src/rawsock.c @@ -660,7 +660,12 @@ rawsock_init_adapter(const char *adapter_name, * Since a lot of things can go wrong, we do a lot of extra * logging here. *----------------------------------------------------------------*/ - if (is_pfring || is_pfring_dna(adapter_name)) { + if(is_pfring && !is_pfring_dna(adapter_name)){ /*First ensure pfring dna adapter is available*/ + fprintf(stderr,"No pfring adapter available. Please install pfring or run masscan without the --pfring option.\n"); + return 0; + } + + if (is_pfring_dna(adapter_name)) { int err; unsigned version;