diff options
| author | Matt Johnston <matt@codeconstruct.com.au> | 2025-07-10 16:55:59 +0800 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2025-07-15 12:08:39 +0200 |
| commit | 3549eb08e5505823857838b5cf5f08567702d054 (patch) | |
| tree | 7ee13fd8d58056b4616ecb94d4b96ee31066fa09 /include/net/mctp.h | |
| parent | 1aeed732f4f885ad36280ca4afb331fa42bf7263 (diff) | |
net: mctp: Allow limiting binds to a peer address
Prior to calling bind() a program may call connect() on a socket to
restrict to a remote peer address.
Using connect() is the normal mechanism to specify a remote network
peer, so we use that here. In MCTP connect() is only used for bound
sockets - send() is not available for MCTP since a tag must be provided
for each message.
The smctp_type must match between connect() and bind() calls.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-6-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/net/mctp.h')
| -rw-r--r-- | include/net/mctp.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/mctp.h b/include/net/mctp.h index ac4f4ecdfc24..c3207ce98f07 100644 --- a/include/net/mctp.h +++ b/include/net/mctp.h @@ -69,7 +69,10 @@ struct mctp_sock { /* bind() params */ unsigned int bind_net; - mctp_eid_t bind_addr; + mctp_eid_t bind_local_addr; + mctp_eid_t bind_peer_addr; + unsigned int bind_peer_net; + bool bind_peer_set; __u8 bind_type; /* sendmsg()/recvmsg() uses struct sockaddr_mctp_ext */ |