1. 05 7月, 2022 1 次提交
  2. 01 1月, 2020 1 次提交
  3. 25 5月, 2019 1 次提交
  4. 25 3月, 2019 1 次提交
  5. 04 1月, 2019 1 次提交
  6. 15 9月, 2018 1 次提交
    • S
      batman-adv: Move OGM rebroadcast stats to orig_ifinfo · dee222c7
      Sven Eckelmann 提交于
      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: NSven Eckelmann <sven@narfation.org>
      Signed-off-by: NSimon Wunderlich <sw@simonwunderlich.de>
      dee222c7
  7. 27 2月, 2018 1 次提交
  8. 26 2月, 2018 1 次提交
    • S
      batman-adv: Fix internal interface indices types · f22e0893
      Sven Eckelmann 提交于
      batman-adv uses internal indices for each enabled and active interface.
      It is currently used by the B.A.T.M.A.N. IV algorithm to identifify the
      correct position in the ogm_cnt bitmaps.
      
      The type for the number of enabled interfaces (which defines the next
      interface index) was set to char. This type can be (depending on the
      architecture) either signed (limiting batman-adv to 127 active slave
      interfaces) or unsigned (limiting batman-adv to 255 active slave
      interfaces).
      
      This limit was not correctly checked when an interface was enabled and thus
      an overflow happened. This was only catched on systems with the signed char
      type when the B.A.T.M.A.N. IV code tried to resize its counter arrays with
      a negative size.
      
      The if_num interface index was only a s16 and therefore significantly
      smaller than the ifindex (int) used by the code net code.
      
      Both &batadv_hard_iface->if_num and &batadv_priv->num_ifaces must be
      (unsigned) int to support the same number of slave interfaces as the net
      core code. And the interface activation code must check the number of
      active slave interfaces to avoid integer overflows.
      
      Fixes: c6c8fea2 ("net: Add batman-adv meshing protocol")
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      Signed-off-by: NSimon Wunderlich <sw@simonwunderlich.de>
      f22e0893
  9. 16 12月, 2017 2 次提交
  10. 04 12月, 2017 1 次提交
  11. 26 1月, 2017 1 次提交
  12. 09 8月, 2016 1 次提交
  13. 30 6月, 2016 1 次提交
  14. 10 5月, 2016 1 次提交
  15. 23 2月, 2016 6 次提交
  16. 10 2月, 2016 1 次提交
  17. 02 2月, 2016 1 次提交
  18. 16 1月, 2016 1 次提交
    • S
      batman-adv: Drop immediate orig_node free function · 42eff6a6
      Sven Eckelmann 提交于
      It is not allowed to free the memory of an object which is part of a list
      which is protected by rcu-read-side-critical sections without making sure
      that no other context is accessing the object anymore. This usually happens
      by removing the references to this object and then waiting until the rcu
      grace period is over and no one (allowedly) accesses it anymore.
      
      But the _now functions ignore this completely. They free the object
      directly even when a different context still tries to access it. This has
      to be avoided and thus these functions must be removed and all functions
      have to use batadv_orig_node_free_ref.
      
      Fixes: 72822225 ("batman-adv: Fix rcu_barrier() miss due to double call_rcu() in TT code")
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: NAntonio Quartulli <a@unstable.cc>
      42eff6a6
  19. 16 12月, 2015 2 次提交
  20. 28 8月, 2015 2 次提交
  21. 25 8月, 2015 1 次提交
  22. 07 6月, 2015 2 次提交
    • S
      batman-adv: Add required includes to all files · 1e2c2a4f
      Sven Eckelmann 提交于
      The header files could not be build indepdent from each other. This is
      happened because headers didn't include the files for things they've used.
      This was problematic because the success of a build depended on the
      knowledge about the right order of local includes.
      
      Also source files were not including everything they've used explicitly.
      Instead they required that transitive includes are always stable. This is
      problematic because some transitive includes are not obvious, depend on
      config settings and may not be stable in the future.
      
      The order for include blocks are:
      
       * primary headers (main.h and the *.h file of a *.c file)
       * global linux headers
       * required local headers
       * extra forward declarations for pointers in function/struct declarations
      
      The only exceptions are linux/bitops.h and linux/if_ether.h in packet.h.
      This header file is shared with userspace applications like batctl and must
      therefore build together with userspace applications. The header
      linux/bitops.h is not part of the uapi headers and linux/if_ether.h
      conflicts with the musl implementation of netinet/if_ether.h. The
      maintainers rejected the use of __KERNEL__ preprocessor checks and thus
      these two headers are only in main.h. All files using packet.h first have
      to include main.h to work correctly.
      Reported-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
      1e2c2a4f
    • S
      batman-adv: Use common Jenkins Hash implementation · 36fd61cb
      Sven Eckelmann 提交于
      An unoptimized version of the Jenkins one-at-a-time hash function is used
      and partially copied all over the code wherever an hashtable is used.
      Instead the optimized version shared between the whole kernel should be
      used to reduce code duplication and use better optimized code.
      
      Only the DAT code must use the old implementation because it is used as
      distributed hash function which has to be common for all nodes.
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
      36fd61cb
  23. 29 5月, 2015 1 次提交
  24. 08 1月, 2015 1 次提交
  25. 18 2月, 2014 1 次提交
  26. 12 1月, 2014 4 次提交
  27. 09 1月, 2014 1 次提交
  28. 23 10月, 2013 1 次提交