An error occurred fetching the project authors.
  1. 26 Jun, 2020 1 commit
  2. 31 Dec, 2019 1 commit
  3. 08 Dec, 2019 1 commit
    • Sven Eckelmann's avatar
      batman-adv: Annotate bitwise integer pointer casts · 61a29286
      Sven Eckelmann authored
      The sparse commit 6002ded74587 ("add a flag to warn on casts to/from
      bitwise pointers") introduced a check for non-direct casts from/to
      restricted datatypes (when -Wbitwise-pointer is enabled).
      
      This triggered various warnings in batman-adv when some (already big
      endian) buffer content was casted to/from the corresponding big endian
      integer data types. But these were correct and can therefore be marked with
      __force to signalize sparse an intended cast from/to a bitwise type.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      61a29286
  4. 25 Mar, 2019 3 commits
    • Sven Eckelmann's avatar
      batman-adv: Make sysfs support optional · 0fa4c30d
      Sven Eckelmann authored
      The sysfs files will be marked as deprecated in the near future. They are
      already replaced by the batadv generic netlink family. Add an Kconfig
      option to disable the sysfs support for users who want to test their tools
      or want to safe some space. This setting should currently still be enabled
      by default to keep backward compatible with legacy tools.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      0fa4c30d
    • Sven Eckelmann's avatar
      batman-adv: Drop license boilerplate · 0d5f20c4
      Sven Eckelmann authored
      All files got a SPDX-License-Identifier with commit 7db7d9f3
      ("batman-adv: Add SPDX license identifier above copyright header"). All the
      required information about the license conditions can be found in
      LICENSES/.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      0d5f20c4
    • Sven Eckelmann's avatar
      batman-adv: Reduce claim hash refcnt only for removed entry · 4ba104f4
      Sven Eckelmann authored
      The batadv_hash_remove is a function which searches the hashtable for an
      entry using a needle, a hashtable bucket selection function and a compare
      function. It will lock the bucket list and delete an entry when the compare
      function matches it with the needle. It returns the pointer to the
      hlist_node which matches or NULL when no entry matches the needle.
      
      The batadv_bla_del_claim is not itself protected in anyway to avoid that
      any other function is modifying the hashtable between the search for the
      entry and the call to batadv_hash_remove. It can therefore happen that the
      entry either doesn't exist anymore or an entry was deleted which is not the
      same object as the needle. In such an situation, the reference counter (for
      the reference stored in the hashtable) must not be reduced for the needle.
      Instead the reference counter of the actually removed entry has to be
      reduced.
      
      Otherwise the reference counter will underflow and the object might be
      freed before all its references were dropped. The kref helpers reported
      this problem as:
      
        refcount_t: underflow; use-after-free.
      
      Fixes: 23721387 ("batman-adv: add basic bridge loop avoidance code")
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      4ba104f4
  5. 04 Jan, 2019 1 commit
  6. 12 Nov, 2018 2 commits
    • Sven Eckelmann's avatar
      batman-adv: Add inconsistent claim netlink dump detection · 24d71b92
      Sven Eckelmann authored
      The netlink dump functionality transfers a large number of entries from the
      kernel to userspace. It is rather likely that the transfer has to
      interrupted and later continued. During that time, it can happen that
      either new entries are added or removed. The userspace could than either
      receive some entries multiple times or miss entries.
      
      Commit 670dc283 ("netlink: advertise incomplete dumps") introduced a
      mechanism to inform userspace about this problem. Userspace can then decide
      whether it is necessary or not to retry dumping the information again.
      
      The netlink dump functions have to be switched to exclusive locks to avoid
      changes while the current message is prepared. The already existing
      generation sequence counter from the hash helper can be used for this
      simple hash.
      Reported-by: default avatarMatthias Schiffer <mschiffer@universe-factory.net>
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      24d71b92
    • Sven Eckelmann's avatar
      batman-adv: Add inconsistent backbone netlink dump detection · b00d0e6a
      Sven Eckelmann authored
      The netlink dump functionality transfers a large number of entries from the
      kernel to userspace. It is rather likely that the transfer has to
      interrupted and later continued. During that time, it can happen that
      either new entries are added or removed. The userspace could than either
      receive some entries multiple times or miss entries.
      
      Commit 670dc283 ("netlink: advertise incomplete dumps") introduced a
      mechanism to inform userspace about this problem. Userspace can then decide
      whether it is necessary or not to retry dumping the information again.
      
      The netlink dump functions have to be switched to exclusive locks to avoid
      changes while the current message is prepared. The already existing
      generation sequence counter from the hash helper can be used for this
      simple hash.
      Reported-by: default avatarMatthias Schiffer <mschiffer@universe-factory.net>
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      b00d0e6a
  7. 07 Sep, 2018 1 commit
  8. 23 Jun, 2018 1 commit
  9. 26 Feb, 2018 1 commit
  10. 25 Feb, 2018 2 commits
    • Sven Eckelmann's avatar
      batman-adv: Fix netlink dumping of BLA backbones · fce672db
      Sven Eckelmann authored
      The function batadv_bla_backbone_dump_bucket must be able to handle
      non-complete dumps of a single bucket. It tries to do that by saving the
      latest dumped index in *idx_skip to inform the caller about the current
      state.
      
      But the caller only assumes that buckets were not completely dumped when
      the return code is non-zero. This function must therefore also return a
      non-zero index when the dumping of an entry failed. Otherwise the caller
      will just skip all remaining buckets.
      
      And the function must also reset *idx_skip back to zero when it finished a
      bucket. Otherwise it will skip the same number of entries in the next
      bucket as the previous one had.
      
      Fixes: ea4152e1 ("batman-adv: add backbone table netlink support")
      Reported-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      fce672db
    • Sven Eckelmann's avatar
      batman-adv: Fix netlink dumping of BLA claims · b0264ecd
      Sven Eckelmann authored
      The function batadv_bla_claim_dump_bucket must be able to handle
      non-complete dumps of a single bucket. It tries to do that by saving the
      latest dumped index in *idx_skip to inform the caller about the current
      state.
      
      But the caller only assumes that buckets were not completely dumped when
      the return code is non-zero. This function must therefore also return a
      non-zero index when the dumping of an entry failed. Otherwise the caller
      will just skip all remaining buckets.
      
      And the function must also reset *idx_skip back to zero when it finished a
      bucket. Otherwise it will skip the same number of entries in the next
      bucket as the previous one had.
      
      Fixes: 04f3f5bf ("batman-adv: add B.A.T.M.A.N. Dump BLA claims via netlink")
      Reported-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      b0264ecd
  11. 21 Dec, 2017 1 commit
  12. 15 Dec, 2017 3 commits
  13. 23 May, 2017 1 commit
  14. 22 Mar, 2017 3 commits
  15. 16 Mar, 2017 1 commit
  16. 26 Jan, 2017 1 commit
  17. 18 Jan, 2017 1 commit
    • Tobias Klauser's avatar
      net: Remove usage of net_device last_rx member · 4a7c9726
      Tobias Klauser authored
      The network stack no longer uses the last_rx member of struct net_device
      since the bonding driver switched to use its own private last_rx in
      commit 9f242738 ("bonding: use last_arp_rx in slave_last_rx()").
      
      However, some drivers still (ab)use the field for their own purposes and
      some driver just update it without actually using it.
      
      Previously, there was an accompanying comment for the last_rx member
      added in commit 4dc89133 ("net: add a comment on netdev->last_rx")
      which asked drivers not to update is, unless really needed. However,
      this commend was removed in commit f8ff080d ("bonding: remove
      useless updating of slave->dev->last_rx"), so some drivers added later
      on still did update last_rx.
      
      Remove all usage of last_rx and switch three drivers (sky2, atp and
      smc91c92_cs) which actually read and write it to use their own private
      copy in netdev_priv.
      
      Compile-tested with allyesconfig and allmodconfig on x86 and arm.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: Mirko Lindner <mlindner@marvell.com>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Reviewed-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a7c9726
  18. 09 Aug, 2016 6 commits
  19. 05 Jul, 2016 2 commits
  20. 30 Jun, 2016 1 commit
  21. 10 May, 2016 2 commits
  22. 03 May, 2016 4 commits