summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuyang Huang <sigefriedhyy@gmail.com>2026-08-08 09:56:41 +0900
committerPaolo Abeni <pabeni@redhat.com>2026-08-13 12:30:27 +0200
commitb13ba4e82bfd5ab8318ae75d545cf3c23abf7a6b (patch)
tree775212976fafb6c5498417eaee19813b5ce06d54
parent8621a7ed80f00f83a6741ad8bd1e1c500d2c5b74 (diff)
downloadlinux-next-b13ba4e82bfd5ab8318ae75d545cf3c23abf7a6b.tar.gz
linux-next-b13ba4e82bfd5ab8318ae75d545cf3c23abf7a6b.zip
netlink: specs: rt-route: add the route deletion reason
Add the del-reason attribute and its enum to the route attribute set, and to the getroute reply, which the route notifications reuse. The attribute is absent from the newroute and delroute request lists. RTA_DEL_REASON is above strict_start_type in rtm_ipv6_policy, so encoding it in a request is rejected with -EINVAL. Signed-off-by: Yuyang Huang <sigefriedhyy@gmail.com> Link: https://patch.msgid.link/20260808005642.26901-10-sigefriedhyy@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r--Documentation/netlink/specs/rt-route.yaml34
1 files changed, 34 insertions, 0 deletions
diff --git a/Documentation/netlink/specs/rt-route.yaml b/Documentation/netlink/specs/rt-route.yaml
index 9f4a1a253676..253037ea5176 100644
--- a/Documentation/netlink/specs/rt-route.yaml
+++ b/Documentation/netlink/specs/rt-route.yaml
@@ -78,6 +78,27 @@ definitions:
-
name: rta-used
type: u32
+ -
+ name: del-reason
+ type: enum
+ name-prefix: rt-del-reason-
+ enum-name: rt-del-reason
+ doc: |
+ Why the kernel deleted a route. New causes may be appended. The
+ value space is family-agnostic, a value is never reinterpreted
+ per address family.
+ entries:
+ -
+ name: unspec
+ doc: The deletion path does not record a cause.
+ -
+ name: expired
+ doc: The RTF_EXPIRES lifetime ran out and the route was garbage
+ collected.
+ -
+ name: ra-withdrawn
+ doc: A Router Advertisement withdrew the route with a zero
+ lifetime.
attribute-sets:
-
@@ -185,6 +206,18 @@ attribute-sets:
type: u32
byte-order: big-endian
display-hint: hex
+ -
+ name: del-reason
+ type: u32
+ enum: del-reason
+ doc: |
+ Emitted only on RTM_DELROUTE notifications, and only when the
+ deletion path records a cause. An absent attribute means
+ either an older kernel or a deletion path that does not
+ record its cause, consumers must treat absent and unspec
+ identically. Currently only IPv6 deletion paths record a
+ cause. The attribute is notification-only, the kernel rejects
+ it in requests.
-
name: metrics
name-prefix: rtax-
@@ -299,6 +332,7 @@ operations:
- dport
- nh-id
- flowlabel
+ - del-reason
dump:
request:
value: 26