net: mctp: Treat MCTP_NET_ANY specially in bind()
authorMatt Johnston <matt@codeconstruct.com.au>
Thu, 10 Jul 2025 08:55:56 +0000 (16:55 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 15 Jul 2025 10:08:39 +0000 (12:08 +0200)
commit5000268c298219396cc01b8c3363a578cd168085
treef9fbfa505c4e74d1f26cc0d30c147cff1f2740fa
parent3954502377ec05a1b37e2dc9bef0bacd4bbd71b2
net: mctp: Treat MCTP_NET_ANY specially in bind()

When a specific EID is passed as a bind address, it only makes sense to
interpret with an actual network ID, so resolve that to the default
network at bind time.

For bind address of MCTP_ADDR_ANY, we want to be able to capture traffic
to any network and address, so keep the current behaviour of matching
traffic from any network interface (don't interpret MCTP_NET_ANY as
the default network ID).

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-3-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/mctp/af_mctp.c