diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2025-03-12 04:38:48 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-03-18 14:58:08 +0300 |
commit | 9a81fc3480bf5dbe2bf80e278c440770f6ba2692 (patch) | |
tree | 6b2f3b4b4ac72a9e0f0e7600421b7dc314dab712 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 9740890ee20e01f99ff1dde84c63dcf089fabb98 (diff) | |
download | linux-9a81fc3480bf5dbe2bf80e278c440770f6ba2692.tar.xz |
ipv6: Set errno after ip_fib_metrics_init() in ip6_route_info_create().
While creating a new IPv6, we could get a weird -ENOMEM when
RTA_NH_ID is set and either of the conditions below is true:
1) CONFIG_IPV6_SUBTREES is enabled and rtm_src_len is specified
2) nexthop_get() fails
e.g.)
# strace ip -6 route add fe80::dead:beef:dead:beef nhid 1 from ::
recvmsg(3, {msg_iov=[{iov_base=[...[
{error=-ENOMEM, msg=[... [...]]},
[{nla_len=49, nla_type=NLMSGERR_ATTR_MSG}, "Nexthops can not be used with so"...]
]], iov_len=32768}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 148
Let's set err explicitly after ip_fib_metrics_init() in
ip6_route_info_create().
Fixes: f88d8ea67fbd ("ipv6: Plumb support for nexthop object in a fib6_info")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250312013854.61125-1-kuniyu@amazon.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions