On Mittwoch, 25. Januar 2017 08:15:52 CET Sven Eckelmann wrote: [...]
this made me curious , and i modified your script a bit - turns out after the 127. IF you add to batman-adv you get an Error - all 510 gretap links was succesfully build ... # ifconfig |grep gre| wc -l 515 # batctl if|sort|wc -l 127 the error is mainly *Error - can't write to file '/sys/class/net/gre128/batman_adv/mesh_iface': Cannot allocate memory
I would guess that your system mostly fails becauseit cannot handle the allocation of the "large" arrays which store:
Looks like their could also be a different problem when your test system uses signed characters by default. Please try the patch  which changes the type from char/s16 to unsigned int.
Kind regards, Sven