Skip to content

Commit 7993ad7

Browse files
ecsvgregkh
authored andcommitted
batman-adv: Ignore own maximum aggregation size during RX
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: [email protected] Fixes: c6c8fea ("net: Add batman-adv meshing protocol") Fixes: 9323158 ("batman-adv: OGMv2 - implement originators logic") Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 205649d commit 7993ad7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

net/batman-adv/bat_iv_ogm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,7 @@ batadv_iv_ogm_aggr_packet(int buff_pos, int packet_len,
325325
/* check if there is enough space for the optional TVLV */
326326
next_buff_pos += ntohs(ogm_packet->tvlv_len);
327327

328-
return (next_buff_pos <= packet_len) &&
329-
(next_buff_pos <= BATADV_MAX_AGGREGATION_BYTES);
328+
return next_buff_pos <= packet_len;
330329
}
331330

332331
/* send a batman ogm to a given interface */

net/batman-adv/bat_v_ogm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,7 @@ batadv_v_ogm_aggr_packet(int buff_pos, int packet_len,
840840
/* check if there is enough space for the optional TVLV */
841841
next_buff_pos += ntohs(ogm2_packet->tvlv_len);
842842

843-
return (next_buff_pos <= packet_len) &&
844-
(next_buff_pos <= BATADV_MAX_AGGREGATION_BYTES);
843+
return next_buff_pos <= packet_len;
845844
}
846845

847846
/**

0 commit comments

Comments
 (0)