Merge branch 'net-mctp-improved-bind-handling'
authorPaolo Abeni <pabeni@redhat.com>
Tue, 15 Jul 2025 10:08:41 +0000 (12:08 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 15 Jul 2025 10:08:41 +0000 (12:08 +0200)
commit55e8757c696210292cfda6f1464991d6f5c4300f
treea9d1f25875eed8f6c219efa2895652cf9911a51e
parenta8594c956cc9dc6799554a554bc422d1ffd4c46b
parente6d8e7dbc5a363a8e55a65f3bbe7f9f44f0aeb4f
Merge branch 'net-mctp-improved-bind-handling'

Matt Johnston says:

====================
net: mctp: Improved bind handling

This series improves a couple of aspects of MCTP bind() handling.

MCTP wasn't checking whether the same MCTP type was bound by multiple
sockets. That would result in messages being received by an arbitrary
socket, which isn't useful behaviour. Instead it makes more sense to
have the duplicate binds fail, the same as other network protocols.
An exception is made for more-specific binds to particular MCTP
addresses.

It is also useful to be able to limit a bind to only receive incoming
request messages (MCTP TO bit set) from a specific peer+type, so that
individual processes can communicate with separate MCTP peers. One
example is a PLDM firmware update requester, which will initiate
communication with a device, and then the device will connect back to the
requester process.

These limited binds are implemented by a connect() call on the socket
prior to bind. connect() isn't used in the general case for MCTP, since
a plain send() wouldn't provide the required MCTP tag argument for
addressing.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
====================

Link: https://patch.msgid.link/20250710-mctp-bind-v4-0-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>