From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9499426656B; Tue, 8 Apr 2025 12:05:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744113908; cv=none; b=fZVWVPDPMYgIMKDtajWc9QcJMZNxUjz+n3kiuqffx18owPrFNwlwpvRAe+h19qD3YDK+1qfPIz8YM9Q/AfUqhxS2JWqQmgM9C2i40m8p/F089DGNVNOZ4/g+oaczLoIXCCvLwyhhW679M6i4f/KKFqfTSHXvw3IjzgssjOeBBfE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744113908; c=relaxed/simple; bh=48fht+LnK3p2kHYTVTZYy4UjAIkslDGz4yM/wDKbI8E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UAyo/ESQVzigEUN1mcFtYyzp52rG2JGETphngiQhNMQ9R0R3MN4wi3NkmJDmpgQy4IImuwffe1vJfESYROBYFboAYsbyt2AXeNr6s7427/gucSg6k0WwNnfXwylevpnsEop5KVJF2GmNVcWB013BX0GhZb0zV4OtNErasmEiT4o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mEjoPf2i; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mEjoPf2i" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 253B5C4CEE5; Tue, 8 Apr 2025 12:05:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744113908; bh=48fht+LnK3p2kHYTVTZYy4UjAIkslDGz4yM/wDKbI8E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mEjoPf2ibJxe56vn5IUXCLp2JME7l01Bx3ROP3dROdWeQpRF2choRqiCJDnBw5dDa 78lONRVN9T9VX6a/p0Mace+3Xm0lYUGgcwwC4rzQrXUPpV7+hfGUl+Z4Y4zJzK2/TE iJyezgWfS/B/AWuhi4X0Bcb3Ylf2vsBpsBDzQUnw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sven Eckelmann , Simon Wunderlich Subject: [PATCH 5.4 064/154] batman-adv: Ignore own maximum aggregation size during RX Date: Tue, 8 Apr 2025 12:50:05 +0200 Message-ID: <20250408104817.346876007@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104815.295196624@linuxfoundation.org> References: <20250408104815.295196624@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sven Eckelmann commit 548b0c5de7619ef53bbde5590700693f2f6d2a56 upstream. An OGMv1 and OGMv2 packet receive processing were not only limited by the number of bytes in the received packet but also by the nodes maximum aggregation packet size limit. But this limit is relevant for TX and not for RX. It must not be enforced by batadv_(i)v_ogm_aggr_packet to avoid loss of information in case of a different limit for sender and receiver. This has a minor side effect for B.A.T.M.A.N. IV because the batadv_iv_ogm_aggr_packet is also used for the preprocessing for the TX. But since the aggregation code itself will not allow more than BATADV_MAX_AGGREGATION_BYTES bytes, this check was never triggering (in this context) prior of removing it. Cc: stable@vger.kernel.org Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol") Fixes: 9323158ef9f4 ("batman-adv: OGMv2 - implement originators logic") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Greg Kroah-Hartman --- net/batman-adv/bat_iv_ogm.c | 3 +-- net/batman-adv/bat_v_ogm.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -325,8 +325,7 @@ batadv_iv_ogm_aggr_packet(int buff_pos, /* check if there is enough space for the optional TVLV */ next_buff_pos += ntohs(ogm_packet->tvlv_len); - return (next_buff_pos <= packet_len) && - (next_buff_pos <= BATADV_MAX_AGGREGATION_BYTES); + return next_buff_pos <= packet_len; } /* send a batman ogm to a given interface */ --- a/net/batman-adv/bat_v_ogm.c +++ b/net/batman-adv/bat_v_ogm.c @@ -845,8 +845,7 @@ batadv_v_ogm_aggr_packet(int buff_pos, i /* check if there is enough space for the optional TVLV */ next_buff_pos += ntohs(ogm2_packet->tvlv_len); - return (next_buff_pos <= packet_len) && - (next_buff_pos <= BATADV_MAX_AGGREGATION_BYTES); + return next_buff_pos <= packet_len; } /**