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 5A08E13C8E8; Tue, 25 Mar 2025 12:30:22 +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=1742905822; cv=none; b=DlG3r86BCcKpZaXqxS09Y+uzdrU4wLDgVUx1lqKOX43qqMP0ruFYX/k0Y/TbWXgpxyHVQdqAXbSdQCKNFP2LXF1M70bXeA/0JMdUDVBZUH9KAKj8e3qj6q4pQA7GyYsDTkNzwDUh6dD4gROTbdYAvSfKRb6VJ0Oc9kxwhLPAkbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742905822; c=relaxed/simple; bh=cWUGRbX9yiuUjCQNo+nBQSLmRJEifFNPoQTwFU/i/ac=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GmnuTMHOR7rci+aMtXurpMtOPUrz0jj7+Ql/1VLGZEwplHajmfhl8WkNUhnjzhKfdiR4a/t5WC4aj3aN8OtkR0iZj8TZ6LrXSPYm3RJ/jLqwr2Hr4b1WlETql9Rj2uo9CwECdQSy1c1t3znUroxmL/HFhWa02yvKa2YYFq65tII= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SMuLroz/; 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="SMuLroz/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 041ADC4CEE4; Tue, 25 Mar 2025 12:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1742905822; bh=cWUGRbX9yiuUjCQNo+nBQSLmRJEifFNPoQTwFU/i/ac=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SMuLroz/+9gv42CI0IRXEdDG+e5d05EbgsVcHL9VTfjrmIv/TsozaehFdfSg/7N1+ I6tiDeQiljgbDdhe2xs+gAKDm16DVajbR1CL/ICus6Rup1ToTsJjJI6U3l6O+6cnzV DLCX6dl7t0aLKK9q42HLMXrkNnfSd2PhSlwFVvoI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sven Eckelmann , Simon Wunderlich Subject: [PATCH 6.1 183/198] batman-adv: Ignore own maximum aggregation size during RX Date: Tue, 25 Mar 2025 08:22:25 -0400 Message-ID: <20250325122201.447628113@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250325122156.633329074@linuxfoundation.org> References: <20250325122156.633329074@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-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 @@ -840,8 +840,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; } /**