]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mctp: don't require a route for null-EID ingress
authorJeremy Kerr <jk@codeconstruct.com.au>
Tue, 31 Mar 2026 07:41:08 +0000 (15:41 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 2 Apr 2026 11:31:37 +0000 (13:31 +0200)
commit0d8647bc74cb50edf02e8c88977657596f20fb17
treea2277d73fed8bc7181f795e06b65316558f2be10
parent8af20defc4edb9e5ded39d36e1c7541569cd84d2
net: mctp: don't require a route for null-EID ingress

Currently, if we receive a physically-addressed packet for the local
stack, we perform a route_lookup_null to find a matching device-based
route. If a route is present, it will always have the ->output fn set to
mctp_dst_input, which provides our delivery mechanism.

However, if we don't yet have any local addresses assigned, we won't
have any local routes to lookup, so this will fail. One of the use-cases
for physical addressing is initial address assignment on endpoint nodes,
where we would have no addresses, and therefore no local routes.

Instead of iterating routes (looking for one matching the dev), just
create a suitable mctp_dst for the device directly.

Add a testcase for the no-route case too.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Link: https://patch.msgid.link/20260331-dev-mctp-null-eids-v1-3-b4d047372eaf@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/mctp/route.c
net/mctp/test/route-test.c