aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index e0489ca731c5..8e1dc3051222 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -114,6 +114,7 @@
114#include <linux/wireless.h> 114#include <linux/wireless.h>
115#include <net/iw_handler.h> 115#include <net/iw_handler.h>
116#include <asm/current.h> 116#include <asm/current.h>
117#include <linux/audit.h>
117 118
118/* 119/*
119 * The list of packet types we will receive (as opposed to discard) 120 * The list of packet types we will receive (as opposed to discard)
@@ -2147,6 +2148,12 @@ void dev_set_promiscuity(struct net_device *dev, int inc)
2147 printk(KERN_INFO "device %s %s promiscuous mode\n", 2148 printk(KERN_INFO "device %s %s promiscuous mode\n",
2148 dev->name, (dev->flags & IFF_PROMISC) ? "entered" : 2149 dev->name, (dev->flags & IFF_PROMISC) ? "entered" :
2149 "left"); 2150 "left");
2151 audit_log(current->audit_context, GFP_ATOMIC,
2152 AUDIT_ANOM_PROMISCUOUS,
2153 "dev=%s prom=%d old_prom=%d auid=%u",
2154 dev->name, (dev->flags & IFF_PROMISC),
2155 (old_flags & IFF_PROMISC),
2156 audit_get_loginuid(current->audit_context));
2150 } 2157 }
2151} 2158}
2152 2159