From: Ben Greear <greearb@candelatech.com>
To: netdev@vger.kernel.org
Subject: Re: [RFC] Fix ip routing rules (partially revert b6c69d4b)
Date: Tue, 14 Dec 2010 13:28:47 -0800 [thread overview]
Message-ID: <4D07E18F.30703@candelatech.com> (raw)
In-Reply-To: <1292025842-14959-1-git-send-email-greearb@candelatech.com>
On 12/10/2010 04:04 PM, greearb@candelatech.com wrote:
> From: Ben Greear<greearb@candelatech.com>
>
> Change 4465b469008bc03b98a1b8df4e9ae501b6c69d4b caused rules
> to stop matching the input device properly because the
> FLOWI_FLAG_MATCH_ANY_IIF is always defined in ip_dev_find().
Any comments on this? I think we should resolve this before .37, since
it appears to be a regression bug...
>
> This breaks rules such as:
>
> ip rule add pref 512 lookup local
> ip rule del pref 0 lookup local
> ip link set eth2 up
> ip -4 addr add 172.16.0.102/24 broadcast 172.16.0.255 dev eth2
> ip rule add to 172.16.0.102 iif eth2 lookup local pref 10
> ip rule add iif eth2 lookup 10001 pref 20
> ip route add 172.16.0.0/24 dev eth2 table 10001
> ip route add unreachable 0/0 table 10001
>
> If you had a second interface 'eth0' that was on a different
> subnet, pinging a system on that interface would fail:
>
> [root@ct503-60 ~]# ping 192.168.100.1
> connect: Invalid argument
>
> This patch partially reverts the problematic patch by
> NOT defining FLOWI_FLAG_MATCH_ANY_IIF. This probably breaks
> the feature that the original author intended to add, and
> it could easily be that the entire patch should be reverted,
> so this needs review before applying.
>
> Signed-off-by: Ben Greear<greearb@candelatech.com>
> ---
> :100644 100644 eb6f69a... 5f73819... M net/ipv4/fib_frontend.c
> net/ipv4/fib_frontend.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
> index eb6f69a..5f73819 100644
> --- a/net/ipv4/fib_frontend.c
> +++ b/net/ipv4/fib_frontend.c
> @@ -163,7 +163,6 @@ struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref)
> .daddr = addr
> }
> },
> - .flags = FLOWI_FLAG_MATCH_ANY_IIF
> };
> struct fib_result res = { 0 };
> struct net_device *dev = NULL;
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2010-12-14 21:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-11 0:04 [RFC] Fix ip routing rules (partially revert b6c69d4b) greearb
2010-12-14 21:28 ` Ben Greear [this message]
2010-12-20 5:42 ` ip rule and/or route problem in 2.6.37-rc5+ David Miller
2010-12-20 17:22 ` Tom Herbert
2010-12-23 9:22 ` Maciej Żenczykowski
2010-12-23 17:42 ` David Miller
2010-12-24 14:41 ` Maciej Żenczykowski
2010-12-23 20:06 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2010-12-10 1:06 Ben Greear
2010-12-10 6:19 ` Ben Greear
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=4D07E18F.30703@candelatech.com \
--to=greearb@candelatech.com \
--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).