Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Ed W <lists@wildgooses.com>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: ipset question - multiple match-set clauses
Date: Tue, 26 Jul 2011 20:18:29 +0100	[thread overview]
Message-ID: <4E2F1305.7000409@wildgooses.com> (raw)

Hi, If I use multiple match-set clauses am I right in assuming that
these form an "AND" relationship, ie all must be satisfied for the rule
to match?

eg my mangle chain (generated by shorewall) looks something like:

Chain tcpre (1 references)
 pkts bytes target     prot opt in     out     source              
destination         
...
    0     0 MARK       all  --  *      *       0.0.0.0/0           
0.0.0.0/0            mark match ! 0x0/0xffff match-set cp1 src,src
match-set cp2 src,src MARK or 0x800
    2   149 MARK       all  --  *      *       0.0.0.0/0           
0.0.0.0/0            mark match ! 0x0/0xffff match-set cp1 src,src MARK
or 0x100

It's clear that the match for only cp1 fires, but the first rule which
matches both cp1/cp2 is not firing.

This seems to be as expected for iptables rules - I'm just debugging
shorewall which has a syntax of "+[ipset1,ipset2]" which is supposed to
generate a logical OR, but generates the above rule (first line).  Can
someone please confirm my understanding is correct?

Thanks

Ed W

             reply	other threads:[~2011-07-26 19:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26 19:18 Ed W [this message]
2011-07-26 19:29 ` ipset question - multiple match-set clauses Ed W

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=4E2F1305.7000409@wildgooses.com \
    --to=lists@wildgooses.com \
    --cc=netfilter@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