LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] rxrpc: Clients must accept conn from any address
@ 2024-04-19 16:30 Marc Dionne
  2024-05-01 22:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Dionne @ 2024-04-19 16:30 UTC (permalink / raw
  To: David Howells, netdev, Paolo Abeni, Eric Dumazet, David S. Miller,
	Jakub Kicinski, Jeffrey Altman
  Cc: linux-kernel, linux-afs

From: Jeffrey Altman <jaltman@auristor.com>

The find connection logic of Transarc's Rx was modified in the mid-1990s
to support multi-homed servers which might send a response packet from
an address other than the destination address in the received packet.
The rules for accepting a packet by an Rx initiator (RX_CLIENT_CONNECTION)
were altered to permit acceptance of a packet from any address provided
that the port number was unchanged and all of the connection identifiers
matched (Epoch, CID, SecurityClass, ...).

This change applies the same rules to the Linux implementation which makes
it consistent with IBM AFS 3.6, Arla, OpenAFS and AuriStorFS.

Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
Signed-off-by: Jeffrey Altman <jaltman@auristor.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
---
v2: Added Fixes: tag

 net/rxrpc/conn_object.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/net/rxrpc/conn_object.c b/net/rxrpc/conn_object.c
index 0af4642aeec4..1539d315afe7 100644
--- a/net/rxrpc/conn_object.c
+++ b/net/rxrpc/conn_object.c
@@ -119,18 +119,13 @@ struct rxrpc_connection *rxrpc_find_client_connection_rcu(struct rxrpc_local *lo
 	switch (srx->transport.family) {
 	case AF_INET:
 		if (peer->srx.transport.sin.sin_port !=
-		    srx->transport.sin.sin_port ||
-		    peer->srx.transport.sin.sin_addr.s_addr !=
-		    srx->transport.sin.sin_addr.s_addr)
+		    srx->transport.sin.sin_port)
 			goto not_found;
 		break;
 #ifdef CONFIG_AF_RXRPC_IPV6
 	case AF_INET6:
 		if (peer->srx.transport.sin6.sin6_port !=
-		    srx->transport.sin6.sin6_port ||
-		    memcmp(&peer->srx.transport.sin6.sin6_addr,
-			   &srx->transport.sin6.sin6_addr,
-			   sizeof(struct in6_addr)) != 0)
+		    srx->transport.sin6.sin6_port)
 			goto not_found;
 		break;
 #endif
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net v2] rxrpc: Clients must accept conn from any address
  2024-04-19 16:30 [PATCH net v2] rxrpc: Clients must accept conn from any address Marc Dionne
@ 2024-05-01 22:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-05-01 22:00 UTC (permalink / raw
  To: Marc Dionne
  Cc: dhowells, netdev, pabeni, edumazet, davem, kuba, jaltman,
	linux-kernel, linux-afs

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 19 Apr 2024 13:30:57 -0300 you wrote:
> From: Jeffrey Altman <jaltman@auristor.com>
> 
> The find connection logic of Transarc's Rx was modified in the mid-1990s
> to support multi-homed servers which might send a response packet from
> an address other than the destination address in the received packet.
> The rules for accepting a packet by an Rx initiator (RX_CLIENT_CONNECTION)
> were altered to permit acceptance of a packet from any address provided
> that the port number was unchanged and all of the connection identifiers
> matched (Epoch, CID, SecurityClass, ...).
> 
> [...]

Here is the summary with links:
  - [net,v2] rxrpc: Clients must accept conn from any address
    https://git.kernel.org/netdev/net/c/8953285d7bd6

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-01 22:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-19 16:30 [PATCH net v2] rxrpc: Clients must accept conn from any address Marc Dionne
2024-05-01 22:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).