From: Florian Westphal <fw@strlen.de>
To: Xin Long <lucien.xin@gmail.com>
Cc: netfilter-devel@vger.kernel.org, fw@strlen.de
Subject: Re: [PATCH net] netfilter: ipt_rpfilter: remove the nh_scope test in rpfilter_lookup_reverse
Date: Tue, 6 Oct 2015 15:10:22 +0200 [thread overview]
Message-ID: <20151006131022.GA25207@breakpoint.cc> (raw)
In-Reply-To: <e4382c194620c20c80991d4a32618266da4c71df.1444136587.git.lucien.xin@gmail.com>
Xin Long <lucien.xin@gmail.com> wrote:
> --accept-local option works for res.type == RTN_LOCAL, which should be from
> the local table, but there, the fib_info's nh->nh_scope = RT_SCOPE_NOWHERE
> ( > RT_SCOPE_HOST). in fib_create_info().
>
> if (cfg->fc_scope == RT_SCOPE_HOST) {
> but in our rpfilter_lookup_reverse():
>
> if (dev_match || flags & XT_RPFILTER_LOOSE)
> return FIB_RES_NH(res).nh_scope <= RT_SCOPE_HOST;
>
> if nh->nh_scope > RT_SCOPE_HOST, it will fail. --accept-local option will never
> be passed.
>
> it seems the test is bogus and can be removed to fix this issue.
Yes, you might want to consider submitting a followup patch that cleans
up the ipv4 route handling against net-next tree.
Acked-by: Florian Westphal <fw@strlen.de>
next prev parent reply other threads:[~2015-10-06 13:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 13:03 [PATCH net] netfilter: ipt_rpfilter: remove the nh_scope test in rpfilter_lookup_reverse Xin Long
2015-10-06 13:10 ` Florian Westphal [this message]
2015-10-12 15:15 ` Pablo Neira Ayuso
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=20151006131022.GA25207@breakpoint.cc \
--to=fw@strlen.de \
--cc=lucien.xin@gmail.com \
--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).