1. 29 Apr, 2016 3 commits
    • Sven Eckelmann's avatar
      batman-adv: Fix reference counting of vlan object for tt_local_entry · a33d970d
      Sven Eckelmann authored
      The batadv_tt_local_entry was specific to a batadv_softif_vlan and held an
      implicit reference to it. But this reference was never stored in form of a
      pointer in the tt_local_entry itself. Instead batadv_tt_local_remove,
      batadv_tt_local_table_free and batadv_tt_local_purge_pending_clients depend
      on a consistent state of bat_priv->softif_vlan_list and that
      batadv_softif_vlan_get always returns the batadv_softif_vlan object which
      it has a reference for. But batadv_softif_vlan_get cannot guarantee that
      because it is working only with rcu_read_lock on this list. It can
      therefore happen that an vid is in this list twice or that
      batadv_softif_vlan_get cannot find the batadv_softif_vlan for an vid due to
      some other list operations taking place at the same time.
      
      Instead add a batadv_softif_vlan pointer directly in batadv_tt_local_entry
      which will be used for the reference counter decremented on release of
      batadv_tt_local_entry.
      
      Fixes: 35df3b29 ("batman-adv: fix TT VLAN inconsistency on VLAN re-add")
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Acked-by: default avatarAntonio Quartulli <a@unstable.cc>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarAntonio Quartulli <a@unstable.cc>
      a33d970d
    • Antonio Quartulli's avatar
      batman-adv: B.A.T.M.A.N V - make sure iface is reactivated upon NETDEV_UP event · b6cf5d49
      Antonio Quartulli authored
      At the moment there is no explicit reactivation of an hard-interface
      upon NETDEV_UP event. In case of B.A.T.M.A.N. IV the interface is
      reactivated as soon as the next OGM is scheduled for sending, but this
      mechanism does not work with B.A.T.M.A.N. V. The latter does not rely
      on the same scheduling mechanism as its predecessor and for this reason
      the hard-interface remains deactivated forever after being brought down
      once.
      
      This patch fixes the reactivation mechanism by adding a new routing API
      which explicitly allows each algorithm to perform any needed operation
      upon interface re-activation.
      
      Such API is optional and is implemented by B.A.T.M.A.N. V only and it
      just takes care of setting the iface status to ACTIVE
      Signed-off-by: default avatarAntonio Quartulli <a@unstable.cc>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      b6cf5d49
    • Antonio Quartulli's avatar
      batman-adv: fix DAT candidate selection (must use vid) · 2871734e
      Antonio Quartulli authored
      Now that DAT is VLAN aware, it must use the VID when
      computing the DHT address of the candidate nodes where
      an entry is going to be stored/retrieved.
      
      Fixes: be1db4f6 ("batman-adv: make the Distributed ARP Table vlan aware")
      Signed-off-by: default avatarAntonio Quartulli <a@unstable.cc>
      [sven@narfation.org: fix conflicts with current version]
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      2871734e
  2. 28 Apr, 2016 32 commits
  3. 27 Apr, 2016 5 commits