summaryrefslogtreecommitdiff
path: root/dissector_netlink.c
blob: 2b23a99e41b0f67075687cd81fcb168e078b4ead (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
/*
 * netsniff-ng - the packet sniffing beast
 * Copyright 2014 Tobias Klauser.
 * Subject to the GPL, version 2.
 */

#include "dissector.h"
#include "dissector_netlink.h"

static inline void dissector_init_entry(int type)
{
	dissector_set_print_type(&nlmsg_ops, type);
}

static inline void dissector_init_exit(int type)
{
	dissector_set_print_type(&none_ops, type);
}

void dissector_init_netlink(int fnttype)
{
	dissector_init_entry(fnttype);
	dissector_init_exit(fnttype);
}

void dissector_cleanup_netlink(void)
{
}
/linux/net-next.git/diff/?id=2851940ffee313e0ff12540a8e11a8c54dea9c65&id2=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