summaryrefslogtreecommitdiff
path: root/bpf_ext.h
blob: f9892edf1ca1fd47446e4e58fc4dbca2d772c5e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef BPF_EXT
#define BPF_EXT

#ifndef SKF_AD_OFF
# define SKF_AD_OFF			(-0x1000)
#endif
#ifndef SKF_AD_PROTOCOL
# define SKF_AD_PROTOCOL		0
#endif
#ifndef SKF_AD_PKTTYPE
# define SKF_AD_PKTTYPE			4
#endif
#ifndef SKF_AD_IFINDEX
# define SKF_AD_IFINDEX			8
#endif
#ifndef SKF_AD_NLATTR
# define SKF_AD_NLATTR			12
#endif
#ifndef SKF_AD_NLATTR_NEST
# define SKF_AD_NLATTR_NEST		16
#endif
#ifndef SKF_AD_MARK
# define SKF_AD_MARK			20
#endif
#ifndef SKF_AD_QUEUE
# define SKF_AD_QUEUE			24
#endif
#ifndef SKF_AD_HATYPE
# define SKF_AD_HATYPE			28
#endif
#ifndef SKF_AD_RXHASH
# define SKF_AD_RXHASH			32
#endif
#ifndef SKF_AD_CPU
# define SKF_AD_CPU			36
#endif
#ifndef SKF_AD_VLAN_TAG
# define SKF_AD_VLAN_TAG		44
#endif
#ifndef SKF_AD_VLAN_TAG_PRESENT
# define SKF_AD_VLAN_TAG_PRESENT	48
#endif
#ifndef SKF_AD_PAY_OFFSET
# define SKF_AD_PAY_OFFSET		52
#endif

#endif /* BPF_EXT */
t-next.git/commit/net/netfilter?h=nds-private-remove&id=90c1aff702d449a1a248c4829d51c0bc677f968e'>90c1aff702d449a1a248c4829d51c0bc677f968e (diff)
netfilter: allow logging from non-init namespaces
Commit 69b34fb996b2 ("netfilter: xt_LOG: add net namespace support for xt_LOG") disabled logging packets using the LOG target from non-init namespaces. The motivation was to prevent containers from flooding kernel log of the host. The plan was to keep it that way until syslog namespace implementation allows containers to log in a safe way. However, the work on syslog namespace seems to have hit a dead end somewhere in 2013 and there are users who want to use xt_LOG in all network namespaces. This patch allows to do so by setting /proc/sys/net/netfilter/nf_log_all_netns to a nonzero value. This sysctl is only accessible from init_net so that one cannot switch the behaviour from inside a container. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_log.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c