Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp760222lqt; Fri, 19 Apr 2024 09:33:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXQCaNs9HUWgThBasbOyHV28ozAlWyGHqKwCBGS1SaQdmfXTzBFdhKytN1uwt4VMJo+vwZ0vTh7m8GmltLPJ9DePlQFVW1qAkSw6s5VWw== X-Google-Smtp-Source: AGHT+IHhF7l+T7hwKZ6pXhPCgtvjQrjSHcC2jQy10S8FGY2cz+dNuiY+1vA92V9ZdAWFSJTSliWX X-Received: by 2002:a05:620a:7f6:b0:78d:6ae4:6778 with SMTP id k22-20020a05620a07f600b0078d6ae46778mr2717168qkk.47.1713544389833; Fri, 19 Apr 2024 09:33:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713544389; cv=pass; d=google.com; s=arc-20160816; b=utolXIuhObj3M4EwVYSiZ+e1/BorDfVQC+1piEJrlaa6OnPpwk3hnBUcpl54aDUTqE KVDdjTHIpxLBc102cGFeooTGw+2UkzV8RjiWE/uQ3II57qn+CSGYDXxjlX1Gx2rREL6B ayJrRP9RyOFS/UvYkkOGR+QcDHLqnVbgoWsTyOEexX9RT3b8yC12UZW13GdOLfcrltow HGM2YpptX1ybcsEdsM1CPuZEsGhbMDlgT7JsSyymwKRfFVFm01lWB5fZVReRCsx0+K0m epiiOWBeTO1k+YIud+C2opfhAKQ6GzFnDtYxpdAtX5qOOhtByBPSCjbDVarQ8L0ebkvZ RbsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=tZt0+bvbyo27WYKm1jClLea1EE0Wu1vF3OW+kTQvhOQ=; fh=muj7UAvcMB41ygriynrx82pQ1PmUqPzOh+R9t+j2uOc=; b=KKu7UeI8OV90uWW4akC3o0PXFQDpJ7HWTl/+iUKVll5UbGs7sM9nvaf5KbSrUBQSea DoCPZCU0YCgIYe4vEZ6u2zW3MNCo/R7SFeuf5VsL/2NPsv9qDbyXSYXfZiFuKpjdTVGl BZoPYEdmZjaXSUtDXY27xG148W/J9FJ3f4e7teJTWtIdZ7VDWI8IQjfmXFyP8qEBBGq8 RCNalYKf6oTW9lSLRSd5L8G9o1ara1xfuFqTWxLi/UKJ4ukzL0WqoxMUwwjcVxuwD6dO qUqk6wG6DMXspSM823YNy+ShgAFpOgWNL5P6qW7lfHxY0aPB2104de8wcFSHDkDPeRg5 pqQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-151751-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151751-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=auristor.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a7-20020a05620a16c700b0078f177d08d2si2198977qkn.233.2024.04.19.09.33.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 09:33:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151751-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-151751-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151751-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=auristor.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 55D611C226CA for ; Fri, 19 Apr 2024 16:33:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75653131BAD; Fri, 19 Apr 2024 16:33:02 +0000 (UTC) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 486CE1DFF0; Fri, 19 Apr 2024 16:33:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713544382; cv=none; b=VSl1DV+9cvouIpZ81GdlSI+LCHnXasFNNYUc3R554WcIGRUIn1+9564W7MgVHt0z4PdCOw35YTqULaVfmmDZDQH4xkqDxOIwT4XjfjuXcaUu1ToyYUygyFBvFNLZv0I1zfV3Yv7KvDWcLuUZ9yZ1Nf8xiDK07whBeHIpn9XUwzs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713544382; c=relaxed/simple; bh=lrsLAInGmmwlG8t8h9BjUv8G4ES4s20nILYak8Fi+Lk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=iQjzsuHl5U8Y/Q5WyKRA1cF2iJT89ZS7GVVCCEYYGiFkk9evfWMUESSKsXGtacTgLyb48ePZ8hc5w0WamLBehQYeX9E0YdEJSeJxdjmpdtvMlQcXxstqv9+gwLN4i26ulLQ+HQ5osb0R5EaFUb+zjpucP8UvpEpfVZkufm1Aj7g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=auristor.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.160.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=auristor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4347cbdb952so9099521cf.3; Fri, 19 Apr 2024 09:33:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713544379; x=1714149179; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tZt0+bvbyo27WYKm1jClLea1EE0Wu1vF3OW+kTQvhOQ=; b=pOQ6ruR3bMhxnpzj+lLDL012moR1Cl8raQZxxE54SwBS5wUxf/dhDgeMF1iQ9cO6wd W8CfQDutAvgLnWxPE5NIGGwuvf42HFtwZ7O6pSUAGprT+nmtPEiEZEH+ecTzzPCu3ejL ItYqsoS/l1jFWgVm75JLZWCj8IG44U6uE28mTwS2Iu85joSmXnUqn6+0sVFXAfw2z68r wALBfBG751leNMqdSb8thhe/YQsMYF0tumtcyaBzLN7mV3dcoIn3NxxGBfoxlL2Z7avH Ckkjtwfh9ogLTJSNnzM7Z+8R8gKi/JtgByD0RabcfJylRKE1ku4YxO8r87ZH2/F/8219 WqFw== X-Forwarded-Encrypted: i=1; AJvYcCUT68sleQdlXjSz9C8pvXmjCfVZLx//BXAPoQYzXvqw1ky7u2IbXXLN+vdsjz/247fPyN+nnIMxr7+BsTIYbPCvaqsSl/1B X-Gm-Message-State: AOJu0YwhJI5ipG4gm1hPwNo2QAcAonjWYH/u6j43iAahr1VpO+Iuc5L1 NKYaUD+eJqSIVD1sPv8XrnoE6M2dV0j/7pYlHdSG27idAO08xJhD X-Received: by 2002:a05:622a:1207:b0:437:bc0f:323a with SMTP id y7-20020a05622a120700b00437bc0f323amr2583923qtx.48.1713544379177; Fri, 19 Apr 2024 09:32:59 -0700 (PDT) Received: from hemlock.fiveisland.rocks (hlfxns014qw-156-57-186-228.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.57.186.228]) by smtp.gmail.com with ESMTPSA id g23-20020ac84dd7000000b00436e0eb2346sm1718444qtw.55.2024.04.19.09.32.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 09:32:58 -0700 (PDT) From: Marc Dionne To: David Howells , netdev@vger.kernel.org, Paolo Abeni , Eric Dumazet , "David S. Miller" , Jakub Kicinski , Jeffrey Altman Cc: linux-kernel@vger.kernel.org, linux-afs@lists.infradead.org Subject: [PATCH net v2] rxrpc: Clients must accept conn from any address Date: Fri, 19 Apr 2024 13:30:57 -0300 Message-ID: <20240419163057.4141728-1-marc.dionne@auristor.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jeffrey Altman 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 Acked-by: David Howells Signed-off-by: Marc Dionne --- 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