On Donnerstag, 16. August 2018 16:54:45 CEST Sven Eckelmann wrote:
B.A.T.M.A.N. IV requires the number of rebroadcast from a neighboring originator. These statistics are gathered per interface which transmitted the OGM (and then received it again). Since an originator is not interface specific, a resizable array was used in each originator.
This resizable array had an entry for each interface and had to be resizes (for all OGMs) when the number of active interface was modified. This could cause problems when a large number of interface is added and not enough continuous memory is available to allocate the array.
There is already a per interface originator structure "batadv_orig_ifinfo" which can be used to store this information.
Signed-off-by: Sven Eckelmann sven@narfation.org
net/batman-adv/bat_iv_ogm.c | 330 ++++++++++---------------------- net/batman-adv/hard-interface.c | 47 +++-- net/batman-adv/originator.c | 107 ----------- net/batman-adv/originator.h | 4 - net/batman-adv/soft-interface.c | 1 - net/batman-adv/types.h | 62 ++---- 6 files changed, 145 insertions(+), 406 deletions(-)
Applied as f36b93064420 [1]
Kind regards, Sven
[1] https://git.open-mesh.org/batman-adv.git/commit/f36b93064420d44998f7984671d5...