netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mr Dash Four <mr.dash.four@googlemail.com>
To: Netfilter Core Team <netfilter-devel@vger.kernel.org>
Cc: Mr Dash Four <mr.dash.four@googlemail.com>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Patrick McHardy <kaber@trash.net>
Subject: [PATCH 2/3] ipset: change 'iface' part in hash:net,iface set
Date: Thu,  5 Jul 2012 23:34:31 +0100	[thread overview]
Message-ID: <1341527720-10125-1-git-send-email-mr.dash.four@googlemail.com> (raw)
In-Reply-To: <cover.1341525006.git.mr.dash.four@googlemail.com>
In-Reply-To: <cover.1341525006.git.mr.dash.four@googlemail.com>

Userspace changes to ipset, allowing 'in' and 'out' values to be
specified for the 'iface' part of hash:net,iface type sets.

Man page updated accordingly.

Signed-off-by: Mr Dash Four <mr.dash.four@googlemail.com>
---
 include/libipset/linux_ip_set.h |    5 +++++
 src/ipset.8                     |    8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/include/libipset/linux_ip_set.h b/include/libipset/linux_ip_set.h
index 008da06..8f2bd95 100644
--- a/include/libipset/linux_ip_set.h
+++ b/include/libipset/linux_ip_set.h
@@ -190,6 +190,10 @@ enum ip_set_dim {
 	 * If changed, new revision of iptables match/target is required.
 	 */
 	IPSET_DIM_MAX = 6,
+	/* 
+	 * Indicates whether the new 'iface' format (in/out) has been used.
+	 */
+	IPSET_DIM_IFACE = 7, 
 };
 
 /* Option flags for kernel operations */
@@ -198,6 +202,7 @@ enum ip_set_kopt {
 	IPSET_DIM_ONE_SRC = (1 << IPSET_DIM_ONE),
 	IPSET_DIM_TWO_SRC = (1 << IPSET_DIM_TWO),
 	IPSET_DIM_THREE_SRC = (1 << IPSET_DIM_THREE),
+	IPSET_DIM_IFACE_INOUT = (1 << IPSET_DIM_IFACE),
 };
 
 #endif /* __IP_SET_H */
diff --git a/src/ipset.8 b/src/ipset.8
index bbad680..522107f 100644
--- a/src/ipset.8
+++ b/src/ipset.8
@@ -800,10 +800,10 @@ set, or by the host prefix value if the set is empty.
 .PP 
 The second direction parameter of the \fBset\fR match and
 \fBSET\fR target modules corresponds to the incoming/outgoing interface:
-\fBsrc\fR to the incoming one (similar to the \fB\-i\fR flag of iptables), while
-\fBdst\fR to the outgoing one (similar to the \fB\-o\fR flag of iptables). When
-the interface is flagged with \fBphysdev:\fR, the interface is interpreted
-as the incoming/outgoing bridge port.
+\fBin\fR for the incoming, 
+\fBout\fR for the outgoing interface, thus, consistent with their appropriate flags in netfilter/iptables), while the format used in prior versions of ipset is also supported:
+\fBsrc\fR indicating the incoming and 
+\fBdst\fR the outgoing interface respectively. If the interface value is preceded with \fBphysdev:\fR, the interface is then interpreted as bridge port.
 .PP 
 The lookup time grows linearly with the number of the different prefix
 values added to the set.
-- 
1.7.10.4


  parent reply	other threads:[~2012-07-05 22:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 22:34 [PATCH 0/3] ipset: change 'iface' part in hash:net,iface set Mr Dash Four
2012-07-05 22:34 ` [PATCH 1/3] iptables: " Mr Dash Four
2012-07-05 22:34 ` Mr Dash Four [this message]
2012-07-05 22:34 ` [PATCH 3/3] ipset: " Mr Dash Four
2012-07-06  8:35 ` [PATCH 0/3] " Jozsef Kadlecsik
2012-07-06 19:05   ` Mr Dash Four
2012-07-06 19:11     ` Jan Engelhardt
2012-07-06 19:21       ` Mr Dash Four
2012-07-06 19:44       ` Mr Dash Four
2012-07-06 19:47     ` Jozsef Kadlecsik
2012-07-06 20:19       ` Mr Dash Four
2012-07-06 20:39         ` Jozsef Kadlecsik
2012-07-06 21:04           ` Mr Dash Four
     [not found]         ` <CAHo-OowHXH9f526QQc4Ln5_P_Osdm1Q_RrBkw83hSGj=oES5ww@mail.gmail.com>
2012-07-06 20:41           ` Mr Dash Four
2012-07-06 20:49             ` Jozsef Kadlecsik
2012-07-06 21:04               ` Mr Dash Four
2012-07-06 21:39                 ` Jozsef Kadlecsik
2012-07-06 22:25                   ` Mr Dash Four
2012-07-07 14:53                     ` Jozsef Kadlecsik
2012-07-07 16:23                       ` Jozsef Kadlecsik
2012-07-08 13:03                         ` Mr Dash Four
2012-07-08 18:55                           ` Jozsef Kadlecsik
2012-07-08 19:03                             ` Mr Dash Four
2012-07-08 19:07                               ` Jozsef Kadlecsik
2012-07-08 19:11                                 ` Mr Dash Four
2012-07-08 20:30                                   ` Jozsef Kadlecsik
2012-07-08 22:10                                     ` Mr Dash Four
2012-07-08 22:20                                       ` Jozsef Kadlecsik
2012-07-08 22:25                                         ` Mr Dash Four
2012-07-08 22:55                                           ` Jozsef Kadlecsik
2012-07-09 20:19                                             ` Mr Dash Four
2012-07-09 22:05                                             ` Mr Dash Four
2012-07-08 13:03                       ` Mr Dash Four
     [not found]                         ` <CAHo-Ooya+1H939TqppUcY+pwprOH34zi-jHtnsN+g522aJ3ctw@mail.gmail.com>
2012-07-08 19:43                           ` Mr Dash Four

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=1341527720-10125-1-git-send-email-mr.dash.four@googlemail.com \
    --to=mr.dash.four@googlemail.com \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).