diff options
-rw-r--r-- | net/batman-adv/aggregation.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/batman-adv/aggregation.h b/net/batman-adv/aggregation.h index 216337bb841f..df4a5a943088 100644 --- a/net/batman-adv/aggregation.h +++ b/net/batman-adv/aggregation.h | |||
@@ -28,8 +28,7 @@ | |||
28 | static inline int aggregated_packet(int buff_pos, int packet_len, | 28 | static inline int aggregated_packet(int buff_pos, int packet_len, |
29 | int tt_num_changes) | 29 | int tt_num_changes) |
30 | { | 30 | { |
31 | int next_buff_pos = buff_pos + BAT_PACKET_LEN + (tt_num_changes * | 31 | int next_buff_pos = buff_pos + BAT_PACKET_LEN + tt_len(tt_num_changes); |
32 | sizeof(struct tt_change)); | ||
33 | 32 | ||
34 | return (next_buff_pos <= packet_len) && | 33 | return (next_buff_pos <= packet_len) && |
35 | (next_buff_pos <= MAX_AGGREGATION_BYTES); | 34 | (next_buff_pos <= MAX_AGGREGATION_BYTES); |