]> git.ipfire.org Git - thirdparty/suricata.git/commit
af_packet: bug #2422. 3184/head
authorAlexander Gozman <a.gozman@securitycode.ru>
Thu, 18 Jan 2018 09:05:15 +0000 (09:05 +0000)
committerEric Leblond <eric@regit.org>
Tue, 23 Jan 2018 12:41:57 +0000 (13:41 +0100)
commitcba41207b3f2d8251f7e0f7944683134d9cf8233
tree4c2ec0ccfdfe333b2680fb5c9ee310d672f2d943
parent790ef2701a0752a8928bc57ce2bddd4e2b61a206
af_packet: bug #2422.

This commit fixes a leak of mmap'ed ring buffer that was not
unmaped when a socket was closed. In addition, the leak could
break an inline channel on certain configurations.

Also slightly changed AFPCreateSocket():
1. If an interface is not up, it does not try to apply any
   settings to a socket. This reduces a number of error messages
   while an interface is down.
2. Interface is considered active if both IFF_UP and IFF_RUNNING
   are present.
src/source-af-packet.c