Skip to contentSkip to conversation

conntrack: introduce -l option to filter by labels

PATCH In review Florian Westphal 1 participant 2 messages Jul 19, 2013 1 message not in the archive netfilter

lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 conntrack: introduce -l option to filter by labels

From: Clemence Faure <[email protected]>

---
I've tested this patch and will apply it soon if noone objects.

 conntrack.8         |    5 ++
 include/conntrack.h |    2 +-
 src/conntrack.c     |  156 ++++++++++++++++++++++++++++++++++++++++++--------
 3 files changed, 137 insertions(+), 26 deletions(-)
conntrack.8 +5 -0
index d80a778..87bf5c0 100644
@@ -144,6 +144,11 @@ the MARK value into the ctmark.
 Otherwise, the mask is logically ANDed with the existing mark before the comparision.
 In "--create" mode, the mask is ignored.
 .TP
+.BI "-l, --label " "LABEL,..."
+Specify the conntrack labels.
+This option is only available in conjunctions with "-L, --dump" or "-E, --event".
+Match entries whose labels matches at least those specified as arguments.
+.TP
 .BI "-c, --secmark " "SECMARK"
 Specify the conntrack selinux security mark.
 .TP
include/conntrack.h +1 -1
index fd6126b..6cd9962 100644
@@ -10,7 +10,7 @@
 #include <netinet/in.h>
 
 #define NUMBER_OF_CMD   19
-#define NUMBER_OF_OPT   24
+#define NUMBER_OF_OPT   25
 
 struct ctproto_handler {
 	struct list_head 	head;
src/conntrack.c +131 -25

263 lines not on this page · raw message

Signature · 1 line
1.7.8.6

A message that is not in the archive (sent off-list or not yet received): [email protected]

author maintainer
#2 lore raw
Quoted 5 lines · Phil Oester

On Fri, Jul 19, 2013 at 04:32:43PM +0200, Florian Westphal wrote:

+This option is only available in conjunctions with "-L, --dump" or "-E, --event".

					     ^

conjunction should be single

Thanks, I'll fix that up before committing.