Hi Andreas,
On 19/03/15 16:46, Andreas Pape wrote:
This missing check lead to a kernel crash when a hard_if is removed on a node forwarding untagged and tagged traffic (VLANID 0) to and from the mesh network.
Did you actually see the crash? if so, can you please report the stacktrace?
When creating bat0 (untagged interface), a "fake" vlan object is created with vid = BATADV_NO_FLAGS, therefore in this context the object "vlan" should never be NULL because there is always an object to retrieve.
Cheers,
Signed-off-by: Andreas Pape apape@phoenixcontact.com
translation-table.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/translation-table.c b/translation-table.c index b20812b..4d3ab8d 100644 --- a/translation-table.c +++ b/translation-table.c @@ -1143,8 +1143,10 @@ static void batadv_tt_local_table_free(struct batadv_priv *bat_priv) /* decrease the reference held for this vlan */ vlan = batadv_softif_vlan_get(bat_priv, tt_common_entry->vid);
batadv_softif_vlan_free_ref(vlan);
batadv_softif_vlan_free_ref(vlan);
if (vlan) {
batadv_softif_vlan_free_ref(vlan);
batadv_softif_vlan_free_ref(vlan);
} batadv_tt_local_entry_free_ref(tt_local); }