summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorJeremy Kerr <jk@codeconstruct.com.au>2024-02-19 17:51:46 +0800
committerPaolo Abeni <pabeni@redhat.com>2024-02-22 13:32:54 +0100
commitee076b73e576b0a052d5686d873346b285ae50ea (patch)
treeda7b0a7fb218ff29eebeb3b7d431805cac60bb9c /include/net
parent6d5c36565c169376e3c5fc54d01d7c6819381465 (diff)
downloadkernel-ee076b73e576b0a052d5686d873346b285ae50ea.tar.gz
net: mctp: avoid confusion over local/peer dest/source addresses
We have a double-swap of local and peer addresses in mctp_alloc_local_tag; the arguments in both call sites are swapped, but there is also a swap in the implementation of alloc_local_tag. This is opaque because we're using source/dest address references, which don't match the local/peer semantics. Avoid this confusion by naming the arguments as 'local' and 'peer', and remove the double swap. The calling order now matches mctp_key_alloc. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mctp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/mctp.h b/include/net/mctp.h
index da86e106c91d..f937a325ea6f 100644
--- a/include/net/mctp.h
+++ b/include/net/mctp.h
@@ -87,7 +87,7 @@ struct mctp_sock {
};
/* Key for matching incoming packets to sockets or reassembly contexts.
- * Packets are matched on (src,dest,tag).
+ * Packets are matched on (peer EID, local EID, tag).
*
* Lifetime / locking requirements:
*
@@ -254,7 +254,7 @@ int mctp_local_output(struct sock *sk, struct mctp_route *rt,
void mctp_key_unref(struct mctp_sk_key *key);
struct mctp_sk_key *mctp_alloc_local_tag(struct mctp_sock *msk,
- mctp_eid_t daddr, mctp_eid_t saddr,
+ mctp_eid_t local, mctp_eid_t peer,
bool manual, u8 *tagp);
/* routing <--> device interface */
al/serial_core.c?h=linux-5.1.y&id=0f646b63a1b2ede7885e45cf6e986128e001f91b'>serial: core: Make uart_parse_options take const char* argumentPaul Cercueil 2017-11-28serial: core: Support common rs485 binding for RTS polarityLukas Wunner 2017-11-28serial: Make retrieval of rs485 properties platform-agnosticLukas Wunner 2017-11-08tty: serial: Remove redundant license textGreg Kroah-Hartman 2017-11-08tty: add SPDX identifiers to all remaining files in drivers/tty/Greg Kroah-Hartman 2017-11-04serial: core: remove redundant assignment to portColin Ian King 2017-09-18serial: Add common rs485 device tree parsing functionUwe Kleine-König 2017-08-28serial: core: Consider rs485 settings to drive RTSRafael Gago 2017-08-28serial: core: remove unneeded irq_wake flagAndy Shevchenko 2017-07-30serial: core: enforce type for upf_t when copyingAndy Shevchenko 2017-06-13serial: rate limit custom-speed deprecation noticeJohan Hovold 2017-05-18serial: enable serdev supportJohan Hovold 2017-05-18serial: core: fix crash in uart_suspend_portLucas Stach 2017-04-08serial: core: Re-use struct uart_port {name} fieldAndy Shevchenko 2017-03-31tty: serial_core: Add name field to uart_port structVignesh R 2017-03-17tty: serial_core, remove state checks in uart_poll*Jiri Slaby 2017-03-02sched/headers: Prepare to move signal wakeup & sigpending methods from <linux...Ingo Molnar