]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 7 Feb 2025 07:24:58 +0000 (16:24 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:15 +0000 (14:40 +0200)
commitce534438a87e4b4e73cff7ca6bbcc85e39e44cc5
tree5111122cd505a003678e47223826cd25ff35143e
parent81d2a85c65bf7be6d48c7d7689a6567d19358baf
ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().

[ Upstream commit 5a1ccffd30a08f5a2428cd5fbb3ab03e8eb6c66d ]

The following patch will not set skb->sk from VRF path.

Let's fetch net from fib_rule->fr_net instead of sock_net(skb->sk)
in fib[46]_rule_configure().

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250207072502.87775-5-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/fib_rules.c
net/ipv6/fib6_rules.c