From: Kristian Evensen <kristian.evensen@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: Kristian Evensen <kristian.evensen@gmail.com>
Subject: [PATCH v2 0/2] conntrack: Support flushing connections with given mark
Date: Wed, 24 Dec 2014 09:57:09 +0100 [thread overview]
Message-ID: <1419411431-24715-1-git-send-email-kristian.evensen@gmail.com> (raw)
This patch adds support for selective flushing of conntrack mappings. By adding
CTA_MARK and CTA_MARK_MASK to a delete-message, the mark is checked before a
connection is deleted while flushing.
One use-case for this feature is on multihomed systems using policy routing
(based on marks). If say for example the next-hop's internet connection goes
down, it is desirable to be able to "reset" all connections using that
interface. However, since the device might be communicating with other devices
on the local network, it is not desitable to set the interface as down.
An iptables-rules can then be used to match not NEW connections without a mark.
generating for example a TCP RST.
v1->v2:
* Fix typo in commit.
* Reduce ifdef pollution by moving filter check to a separate function, used in
both dump and flush path.
* Consolidate code for setting up flush in a separate function, remove use of
nf_conntrack_flush_report.
Kristian Evensen (2):
conntrack: Flush connections with a given mark
conntrack: Remove nf_ct_conntrack_flush_report
include/net/netfilter/nf_conntrack.h | 2 --
net/netfilter/nf_conntrack_core.c | 6 ----
net/netfilter/nf_conntrack_netlink.c | 57 ++++++++++++++++++++++++++++--------
3 files changed, 45 insertions(+), 20 deletions(-)
--
2.1.0
next reply other threads:[~2014-12-24 8:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-24 8:57 Kristian Evensen [this message]
2014-12-24 8:57 ` [PATCH v2 1/2] conntrack: Flush connections with a given mark Kristian Evensen
2015-01-07 18:56 ` Pablo Neira Ayuso
2015-01-07 20:05 ` Kristian Evensen
2015-01-08 13:13 ` Pablo Neira Ayuso
2015-01-08 13:28 ` Kristian Evensen
2015-01-07 20:16 ` Kristian Evensen
2014-12-24 8:57 ` [PATCH v2 2/2] conntrack: Remove nf_ct_conntrack_flush_report Kristian Evensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1419411431-24715-1-git-send-email-kristian.evensen@gmail.com \
--to=kristian.evensen@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).