farp: Require CAP_NET_RAW capability to open AF_PACKET socket

This commit is contained in:
Tobias Brunner 2013-06-25 08:37:01 +02:00
parent 6f15f5e632
commit 405f5ab9e9
1 changed files with 6 additions and 0 deletions

View File

@ -92,6 +92,12 @@ plugin_t *farp_plugin_create()
{
private_farp_plugin_t *this;
if (!lib->caps->keep(lib->caps, CAP_NET_RAW))
{ /* required to open ARP socket (AF_PACKET) */
DBG1(DBG_NET, "farp plugin requires CAP_NET_RAW capability");
return NULL;
}
INIT(this,
.public = {
.plugin = {