From: Eric Leblond Date: Tue, 26 Apr 2016 17:46:19 +0000 (+0200) Subject: af-packet: print errno on mmap error X-Git-Tag: suricata-3.1RC1~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88f5d7d16605d43afb44d134facf26239af48b45;p=thirdparty%2Fsuricata.git af-packet: print errno on mmap error --- diff --git a/src/source-af-packet.c b/src/source-af-packet.c index f6b6237f68..0581f00e72 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -1751,7 +1751,8 @@ static int AFPSetupRing(AFPThreadVars *ptv, char *devname) ring_buf = mmap(0, ring_buflen, PROT_READ|PROT_WRITE, mmap_flag, ptv->socket, 0); if (ring_buf == MAP_FAILED) { - SCLogError(SC_ERR_MEM_ALLOC, "Unable to mmap"); + SCLogError(SC_ERR_MEM_ALLOC, "Unable to mmap, error %s", + strerror(errno)); goto mmap_err; } #ifdef HAVE_TPACKET_V3