Kristian Evensen 866476f323 netfilter: conntrack: Flush connections with a given mark
This patch adds support for selective flushing of conntrack mappings.
By adding CTA_MARK and CTA_MARK_MASK to a delete-message, the mark (and
mask) is checked before a connection is deleted while flushing.

Configuring the flush is moved out of ctnetlink_del_conntrack(), and
instead of calling nf_conntrack_flush_report(), we always call
nf_ct_iterate_cleanup().  This enables us to only make one call from the
new ctnetlink_flush_conntrack() and makes it easy to add more filter
parameters.

Filtering is done in the ctnetlink_filter_match()-function, which is
also called from ctnetlink_dump_table(). ctnetlink_dump_filter has been
renamed ctnetlink_filter, to indicated that it is no longer only used
when dumping conntrack entries.

Moreover, reject mark filters with -EOPNOTSUPP if no ct mark support is
available.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2015-01-08 12:14:20 +01:00
..
2014-10-15 10:25:04 +10:30
2014-11-24 04:28:48 -05:00
2014-12-09 16:29:03 -05:00
2014-11-24 04:28:48 -05:00
2014-12-09 16:29:03 -05:00
2014-12-07 21:22:05 +01:00
2014-11-24 04:28:51 -05:00
2014-11-24 04:28:48 -05:00
2014-11-05 23:52:33 -08:00
2014-10-09 01:40:05 -04:00
2014-11-24 04:28:48 -05:00
2014-11-24 04:28:48 -05:00
2014-11-24 04:28:48 -05:00
2014-12-10 15:13:13 -08:00
2014-12-09 16:29:03 -05:00
2014-12-09 16:29:03 -05:00
2014-10-07 20:28:44 -04:00
2014-11-24 04:28:48 -05:00
2014-12-09 16:29:03 -05:00
2014-12-09 16:29:03 -05:00