From: Florian Westphal <fw@strlen.de>
To: Liping Zhang <zlpnobody@163.com>
Cc: Florian Westphal <fw@strlen.de>,
pablo@netfilter.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next] netfilter: nft_fib: store loopback interface to dreg when rt is local
Date: Thu, 24 Nov 2016 15:48:59 +0100 [thread overview]
Message-ID: <20161124144859.GE24598@breakpoint.cc> (raw)
In-Reply-To: <50e29b0e.fa76.15896bf2fb2.Coremail.zlpnobody@163.com>
Liping Zhang <zlpnobody@163.com> wrote:
> At 2016-11-24 21:50:14, "Florian Westphal" <fw@strlen.de> wrote:
> >Liping Zhang <zlpnobody@163.com> wrote:
> >> In general, we haven't do routing lookup in PREROUTING hook, so it's
> >> very likely that fib4/6_is_local will not be met.
[..]
> Yes, so I use the words "very likely" :)
> [...]
> >but in "saddr oif eq 0 drop" case they really should have no oif, the
> >address should not be considered routeable.
>
> Yes, I read the ipt_rpfilter.c's source codes, and I find that there's a test flag
> XT_RPFILTER_ACCEPT_LOCAL, so I guess your initial intention is (just my
> guess, maybe I'm wrong):
> 0 - no route
> 1 - local route
> others - routing oif
Yes, thats right.
"1" should only appear if lookup-up address is configured on this machine.
For saddr, I don't think its good idea, because it will pass
oif ne 0 accept
For ACCEPT_LOCAL i think its easier to combine this with the addrtype
check of just add explicit accept rules that make it bypass nft_fib
rule.
What do you think?
I agree that for your prerouting daddr example 0 makes no sense and 1
would indeed be a better option.
next prev parent reply other threads:[~2016-11-24 14:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-24 13:28 [PATCH nf-next] netfilter: nft_fib: store loopback interface to dreg when rt is local Liping Zhang
2016-11-24 13:50 ` Florian Westphal
2016-11-24 14:31 ` Liping Zhang
2016-11-24 14:48 ` Florian Westphal [this message]
2016-11-25 13:47 ` Liping Zhang
2016-11-28 12:25 ` Florian Westphal
2016-11-30 10:18 ` Liping Zhang
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=20161124144859.GE24598@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=zlpnobody@163.com \
/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).