From: David Miller <davem@davemloft.net>
To: ja@ssi.bg
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net 1/6] ipv4: fix sending of redirects
Date: Mon, 08 Oct 2012 16:41:58 -0400 (EDT) [thread overview]
Message-ID: <20121008.164158.1437741527673072117.davem@davemloft.net> (raw)
In-Reply-To: <alpine.LFD.2.00.1210082259180.12172@ja.ssi.bg>
From: Julian Anastasov <ja@ssi.bg>
Date: Mon, 8 Oct 2012 23:43:45 +0300 (EEST)
> On Mon, 8 Oct 2012, David Miller wrote:
>
>> From: Julian Anastasov <ja@ssi.bg>
>> Date: Sun, 7 Oct 2012 14:26:03 +0300
>>
>> > @@ -322,7 +322,8 @@ int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst,
>> > {
>> > int r = secpath_exists(skb) ? 0 : IN_DEV_RPFILTER(idev);
>> >
>> > - if (!r && !fib_num_tclassid_users(dev_net(dev))) {
>> > + if (!r && !fib_num_tclassid_users(dev_net(dev)) &&
>> > + dev->ifindex != oif) {
>> > *itag = 0;
>> > return 0;
>> > }
>>
>> Hmmm, won't this cause the slow path to be taken for locally
>> destined traffic?
>
> In this case idev=eth0 and oif=lo. The only case
> where we can see same input and output device is for
> forwarding and loopback (but only output routes where
> there is no such validation).
Ok, now I understand. This added condition is fine.
Thanks.
next prev parent reply other threads:[~2012-10-08 20:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-07 11:26 [PATCH net 0/6] ipv4: Changes for rt_gateway Julian Anastasov
2012-10-07 11:26 ` [PATCH net 1/6] ipv4: fix sending of redirects Julian Anastasov
2012-10-08 19:16 ` David Miller
2012-10-08 20:43 ` Julian Anastasov
2012-10-08 20:41 ` David Miller [this message]
2012-10-07 11:26 ` [PATCH net 2/6] ipv4: fix forwarding for strict source routes Julian Anastasov
2012-10-07 11:26 ` [PATCH net 3/6] ipv4: add check if nh_pcpu_rth_output is allocated Julian Anastasov
2012-10-07 13:34 ` Eric Dumazet
2012-10-07 17:24 ` Julian Anastasov
2012-10-08 19:17 ` David Miller
2012-10-07 11:26 ` [PATCH net 4/6] ipv4: introduce rt_uses_gateway Julian Anastasov
2012-10-07 11:26 ` [PATCH net 5/6] ipv4: Add FLOWI_FLAG_KNOWN_NH Julian Anastasov
2012-10-07 11:26 ` [PATCH net 6/6] ipvs: fix ARP resolving for direct routing mode Julian Anastasov
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=20121008.164158.1437741527673072117.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ja@ssi.bg \
--cc=netdev@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).