diff options
| author | Yuyang Huang <sigefriedhyy@gmail.com> | 2026-08-08 09:56:33 +0900 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-08-13 12:30:27 +0200 |
| commit | cc17e386f8a5fc23a3bf49a45d17cd45b49fbb01 (patch) | |
| tree | 784d555f69554b7105316f8d6ff62accd137d80a /net | |
| parent | f6057f06ef7afa9893ed33603f7917fa39d237b5 (diff) | |
| download | linux-cc17e386f8a5fc23a3bf49a45d17cd45b49fbb01.tar.gz linux-cc17e386f8a5fc23a3bf49a45d17cd45b49fbb01.zip | |
ipv6: add ip6_del_rt_reason()
Add RTA_DEL_REASON and enum rt_del_reason to the rtnetlink uAPI, and
add ip6_del_rt_reason(), which takes the reason a route is being
deleted. It has no skip_notify argument: a caller that records a
deletion reason wants the notification that carries it.
The reason is unused for now. Subsequent patches propagate it to the
deletion path and report it on RTM_DELROUTE.
Signed-off-by: Yuyang Huang <sigefriedhyy@gmail.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260808005642.26901-2-sigefriedhyy@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net')
| -rw-r--r-- | net/ipv6/route.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 5968ce5ad150..9898578cb418 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -4004,6 +4004,14 @@ int ip6_del_rt(struct net *net, struct fib6_info *rt, bool skip_notify) return __ip6_del_rt(rt, &info); } +int ip6_del_rt_reason(struct net *net, struct fib6_info *rt, + enum rt_del_reason del_reason) +{ + struct nl_info info = { .nl_net = net }; + + return __ip6_del_rt(rt, &info); +} + static int __ip6_del_rt_siblings(struct fib6_info *rt, struct fib6_config *cfg) { struct nl_info *info = &cfg->fc_nlinfo; |
