From: Florian Westphal <fw@strlen.de>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH RFC 0/3] netfilter reverse path filter matches
Date: Fri, 26 Aug 2011 11:21:02 +0200 [thread overview]
Message-ID: <1314350465-19598-1-git-send-email-fw@strlen.de> (raw)
Here are the ipv4/ipv6 reverse path filter matches that
were discussed briefly at the workshop.
These are not ready for merging at this time, but I think
sending current status is helpful in moving things forward.
There are 3 matches:
xt_rpfilter, ipt_rpfilter, ip6t_rpfilter.
Obviously, it will be either xt_rpfilter or the latter two.
At the moment, xt_rpfilter has too many issues: it does not behave
the same as current ip4-builtin rp_filter, because output route resolution
is used for validation.
Depending on the routes this may result in different route lookup results
than what a real reply packet would see.
It also breaks with ipv4 multipath setups when there are several matching
routes.
As ipv4 and ipv6 need different treatment anyway, using different modules
does not seem to be a problem. (This also avoids extra module dependency
issues)
The ipv4-only match (ipt_rpfilter) tries to do exactly what the current
fib_validate_source does. Known remaining Problems are:
- additional fib lookup to get oif (will be used in reverse lookup as iif)
- using match in PREROUTING may do the wrong thing when
policy routing is used via mangle PREROUTING (we may perform
fib lookup with wrong nfmark)
- using it in FORWARD is problematic because stack could send out
icmp errors (ttl exceeded, PMTU, ...) before the packet would
have been rpf-tested.
We seemed to have consesus on the following:
- no special treatment of ipsec-protected packets (users can use policy match)
- packets from IFF_LOOPBACK should always match
- result caching can be implemented later on, if needed.
Userspace part is stored in my iptables repository on
http://git.breakpoint.cc/cgi-bin/gitweb.cgi?p=fw/iptables.git (branch 'rpfilter').
Kernel patches are located in the 'xt_rpfilter' branch on
http://git.breakpoint.cc/cgi-bin/gitweb.cgi?p=fw/nf-next.git (i'll send the relevant patches
as followup to this email).
Please let me know if I forgot any remaing issues, or if you spot any
additional issues that have not been raised so far.
Thanks,
Florian
next reply other threads:[~2011-08-26 9:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 9:21 Florian Westphal [this message]
2011-08-26 9:21 ` [PATCH RFC 1/3] netfilter: add reverse path filter match Florian Westphal
2011-08-26 9:21 ` [PATCH RFC 2/3] netfilter: add ipv4 " Florian Westphal
2011-08-30 12:34 ` Patrick McHardy
2011-08-30 12:41 ` Florian Westphal
2011-08-30 12:45 ` Patrick McHardy
2011-08-30 12:57 ` Florian Westphal
2011-08-30 13:03 ` Patrick McHardy
2011-08-30 13:53 ` Jan Engelhardt
2011-08-30 13:54 ` Patrick McHardy
2011-08-26 9:21 ` [PATCH RFC 3/3] ip6t_rpf: initial version Florian Westphal
2011-08-26 9:58 ` Jan Engelhardt
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=1314350465-19598-1-git-send-email-fw@strlen.de \
--to=fw@strlen.de \
--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).