This is the second patchset of the TT-VLAN improvement. It brings a not negligible change into the TT logic since it is splitting the CRC mechanism on a per-VLAN basis. Since it is not so easy to digest I decided to send it alone.
This change is required by an improvement which will come right after: VLAN based TT filtering for BLA2 enabled nodes (third patchset of the TT-VLAN feature).
In a few words.... Right now a backbone node rejects any TT entry announced by another backbone. With this change it will be possible to filter out only those TT entries belonging to the VLAN where BLA2 is running on. In this way, the others VLANs will still be able to contact each other.
Before implementing the new feature, the first patch is introducing a new lock to make any change to the local and global TT table atomic. In this way a TT Reply cannot be sent during a writing operation on one of the TT tables. This will prevent the TT Reply from containing any inconsistent data.
Changes from v6: - remove orig_node_vlan from the list after freeing - introduce locking around TT operations with 1/2 - fixed refcounting - fixed style
Antonio Quartulli (2): batman-adv: lock around TT operations to avoid sending inconsistent data batman-adv: make the TT CRC logic VLAN specific
compat.c | 9 + compat.h | 1 + main.c | 1 + originator.c | 102 +++++++- originator.h | 7 + packet.h | 18 +- translation-table.c | 730 ++++++++++++++++++++++++++++++++++++++++++---------- types.h | 45 +++- 8 files changed, 759 insertions(+), 154 deletions(-)