[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_1Eu2xm3QAncMx8@shredder>
Date: Mon, 14 Apr 2025 20:24:11 +0300
From: Ido Schimmel <idosch@...sch.org>
To: hanhuihui <hanhuihui5@...wei.com>
Cc: dsahern@...nel.org, kuba@...nel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] resume oif rule match l3mdev in fib_lookup
On Mon, Apr 14, 2025 at 10:17:35AM +0300, Ido Schimmel wrote:
> On Sat, Apr 12, 2025 at 09:19:10PM +0800, hanhuihui wrote:
> > flowi_oif will be reset if flowi_oif set to a l3mdev (e.g., VRF) device.
> > This causes the oif rule to fail to match the l3mdev device in fib_lookup.
> > Let's get back to previous behavior.
> >
> > Fixes: 40867d74c374 ("net: Add l3mdev index to flow struct and avoid oif reset for port devices")
> > Signed-off-by: hanhuihui hanhuihui5@...wei.com
> > ---
> > net/core/fib_rules.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
> > index 4bc64d9..3c2a2db 100644
> > --- a/net/core/fib_rules.c
> > +++ b/net/core/fib_rules.c
> > @@ -268,7 +268,7 @@ static int fib_rule_match(struct fib_rule *rule, struct fib_rules_ops *ops,
> > goto out;
> >
> > oifindex = READ_ONCE(rule->oifindex);
> > - if (oifindex && (oifindex != fl->flowi_oif))
> > + if (oifindex && (oifindex != (fl->flowi_l3mdev ? : fl->flowi_oif)))
>
> This will prevent us from matching on the output device when the device
> is enslaved to a VRF. We should try to match on L3 domain only if the
> FIB rule matches on a VRF device. I will try to send a fix today (wasn't
> feeling well in the last few days).
Posted a fix:
https://lore.kernel.org/netdev/20250414172022.242991-2-idosch@nvidia.com/
Can you please test it and tag it if it fixes your issue?
Thanks
Powered by blists - more mailing lists