[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250412131910.15559-1-hanhuihui5@huawei.com>
Date: Sat, 12 Apr 2025 21:19:10 +0800
From: hanhuihui <hanhuihui5@...wei.com>
To: <idosch@...sch.org>
CC: <dsahern@...nel.org>, <hanhuihui5@...wei.com>, <kuba@...nel.org>,
<netdev@...r.kernel.org>
Subject: [PATCH] resume oif rule match l3mdev in fib_lookup
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)))
goto out;
if ((rule->mark ^ fl->flowi_mark) & rule->mark_mask)
--
2.27.0
Powered by blists - more mailing lists