diff options
author | Remi Pommarel <repk@triplefau.lt> | 2025-01-28 16:11:06 +0100 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2025-01-28 22:06:56 +0100 |
commit | f4c9c2cc827d803159730b1da813a0c595969831 (patch) | |
tree | 179921a9f4e107bf64c0280e7d93f01575ae223f /net/ipv4/ip_gre.c | |
parent | 8c8ecc98f5c65947b0070a24bac11e12e47cc65d (diff) |
batman-adv: Fix incorrect offset in batadv_tt_tvlv_ogm_handler_v1()
Since commit 4436df478860 ("batman-adv: Add flex array to struct
batadv_tvlv_tt_data"), the introduction of batadv_tvlv_tt_data's flex
array member in batadv_tt_tvlv_ogm_handler_v1() put tt_changes at
invalid offset. Those TT changes are supposed to be filled from the end
of batadv_tvlv_tt_data structure (including vlan_data flexible array),
but only the flex array size is taken into account missing completely
the size of the fixed part of the structure itself.
Fix the tt_change offset computation by using struct_size() instead of
flex_array_size() so both flex array member and its container structure
sizes are taken into account.
Cc: stable@vger.kernel.org
Fixes: 4436df478860 ("batman-adv: Add flex array to struct batadv_tvlv_tt_data")
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/ipv4/ip_gre.c')
0 files changed, 0 insertions, 0 deletions