diff options
| author | Kuniyuki Iwashima <[email protected]> | 2025-02-07 07:24:59 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-02-11 03:08:52 +0000 |
| commit | a0596c2c63fc9d9ad16d701044293e11d8f97953 (patch) | |
| tree | 87737c9a47fbee0a1024875b118d07478697726e /tools/testing/selftests/net/lib/py/ynl.py | |
| parent | ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure(). (diff) | |
| download | kernel-a0596c2c63fc9d9ad16d701044293e11d8f97953.tar.gz kernel-a0596c2c63fc9d9ad16d701044293e11d8f97953.zip | |
net: fib_rules: Factorise fib_newrule() and fib_delrule().
fib_nl_newrule() / fib_nl_delrule() is the doit() handler for
RTM_NEWRULE / RTM_DELRULE but also called from vrf_newlink().
Currently, we hold RTNL on both paths but will not on the former.
Also, we set dev_net(dev)->rtnl to skb->sk in vrf_fib_rule() because
fib_nl_newrule() / fib_nl_delrule() fetch net as sock_net(skb->sk).
Let's Factorise the two functions and pass net and rtnl_held flag.
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Tested-by: Ido Schimmel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/ynl.py')
0 files changed, 0 insertions, 0 deletions
