1. 27 Aug, 2019 1 commit
  2. 01 Aug, 2019 3 commits
  3. 21 Jul, 2019 1 commit
  4. 13 Jul, 2019 1 commit
    • Sven Eckelmann's avatar
      batctl: Fix command restriction for meshif-only prefix · 1d7dba84
      Sven Eckelmann authored
      The allowed commands for a meshif prefix are evaluated by comparing the
      type bits. These are initialized completely when allowing non-meshif and
      meshif commands. But a meshif-only prefix did an OR without previously
      setting the types bitfield to 0. This could have allowed too many commands
      than expected.
      
      Fixes: 23f39261 ("batctl: Replace '-m meshif' option with selector prefix")
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      1d7dba84
  5. 12 Jul, 2019 6 commits
    • Sven Eckelmann's avatar
      batctl: Allow to omit explicit prefix name · f5b4e96c
      Sven Eckelmann authored
      batctl allows three types of netdev based prefixes
      
      * meshif <netdev>
      * vlan <vdev>
      * hardif <netdev>
      
      The first word is used to tell batctl that the netdev is expected to be of
      a specific type and all further information should be parsed in context of
      this specific type. This avoids ambiguity when parsing the command line
      information.
      
      But there are various situations when there is no ambiguity at all. For all
      of them, following points are true:
      
      * <netdev|vdev> exists
      * <netdev|vdev> has not the name of any existing batctl subcommand
      * <netdev|vdev> is not "vlan", "vid", "hardif" or "meshif"
      
      In these situations, the first word can be omitted and batctl can guess the
      type automatically.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      f5b4e96c
    • Sven Eckelmann's avatar
      batctl: Replace '-m meshif' option with selector prefix · 23f39261
      Sven Eckelmann authored
      The '-m meshif' option doesn't follow the prefix style which is used for
      VLANs/hard interfaces. It is also not clear for a user which command
      understands the '-m' option and which is actually operating on a
      global/non-meshif specific scope. To clean this up, an additional command
      prefix called meshif is implemented:
      
        $ batctl meshif bat0 ...
      
      This can be omitted when it would be "meshif bat0". And when it is
      specified, all non-meshif specific subcommands will be rejected.
      
      The old option '-m meshif' option is still available to avoid breaking
      existing scripts. It will will show an error message but continues to work
      for now. Users of batctl should still transition to the new format.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      23f39261
    • Sven Eckelmann's avatar
      batctl: Add throughput_override setting command · e5e6560d
      Sven Eckelmann authored
      B.A.T.M.A.N. V introduced a hard interface specific setting called
      throughput. It defines the throughput value to be used by B.A.T.M.A.N. V
      when estimating the link throughput using this interface. If the value is
      set to 0 then batman-adv will try to estimate the throughput by itself.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      e5e6560d
    • Sven Eckelmann's avatar
      batctl: Add elp_interval setting command · df5c452a
      Sven Eckelmann authored
      B.A.T.M.A.N. V introduced a hard interface specific setting called
      elp_interval. It defines the interval in milliseconds in which batman-adv
      emits probing packets for neighbor sensing (ELP).
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      df5c452a
    • Sven Eckelmann's avatar
      batctl: Integrate hardif setting framework · 6ed4dfc5
      Sven Eckelmann authored
      batctl currently supports settings which are either mesh interface or vlan
      specific. But B.A.T.M.A.N. V introduced two additional settings which are
      hard (slave) interface specific.
      
      To support these, an additional command prefix called hardif is implemented
      for some sysfs commands:
      
        $ batctl hardif eth0 ...
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      6ed4dfc5
    • Sven Eckelmann's avatar
      batctl: Make vlan setting explicit · 4704c5e0
      Sven Eckelmann authored
      The requirement to have a VLAN master device on top of the batadv mesh
      interface is artificially limiting the capabilities of batctl. Not all
      master devices in linux which register a VLAN are from type "vlan" and are
      only registering a single VLAN.
      
      For example VLAN aware bridges can create multiple VLANs. These require
      that the VLAN is identified using the VID and not the vlan device.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      4704c5e0
  6. 06 Jul, 2019 2 commits
  7. 04 Jul, 2019 2 commits
    • Sven Eckelmann's avatar
      batctl: mcast_flags: Add support for MCASTv2 RTR(4|6) flags · 9769efa8
      Sven Eckelmann authored
      The batman-adv commit 0a7733468f95 ("batman-adv: mcast: detect, distribute
      and maintain multicast router presence") added support for two new flags
      BATADV_MCAST_WANT_NO_RTR4 and BATADV_MCAST_WANT_NO_RTR6. These are
      announced in IV_OGM and OGMv2.
      
      The mcast_flags debug table requires support for it to make debugging of
      router-to-router multicast problems in networks easier.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      9769efa8
    • Sven Eckelmann's avatar
      batctl: tcpdump: Add support for MCASTv2 RTR(4|6) flags · ae5497b6
      Sven Eckelmann authored
      The batman-adv commit 0a7733468f95 ("batman-adv: mcast: detect, distribute
      and maintain multicast router presence") added support for two new flags
      BATADV_MCAST_WANT_NO_RTR4 and BATADV_MCAST_WANT_NO_RTR6. These are
      announced in IV_OGM and OGMv2.
      
      batctl's tcpdump requires support for it to make debugging of
      router-to-router multicast problems in networks easier.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      ae5497b6
  8. 27 Jun, 2019 2 commits
  9. 15 Jun, 2019 4 commits
    • Sven Eckelmann's avatar
      batctl: Introduce MCASTv2 flags for RTR · b382c0a2
      Sven Eckelmann authored
      The commit 0a7733468f95 ("batman-adv: mcast: detect, distribute and
      maintain multicast router presence") introduced two new flags for the RTR
      implementation of MCASTv2:
      
      * BATADV_MCAST_WANT_NO_RTR4
      * BATADV_MCAST_WANT_NO_RTR6
      
      batctl requires them to implement support for it in the subcommand tcpdump
      and mcast_flags.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      b382c0a2
    • Sven Eckelmann's avatar
      batctl: tcpdump: Add support for coded packets · 9aae3c9f
      Sven Eckelmann authored
      The network coding support in batman-adv was introduced with commit
      c3289f3650d3 ("batman-adv: network coding - code and transmit packets if
      possible"). The support to identify such packets by batctl's tcpdump was
      never implemented.
      
      This minimal implementation allows to identify these packets but is not
      able to decode the packets.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      9aae3c9f
    • Sven Eckelmann's avatar
      batctl: tcpdump: Add support for unicast fragmentation · 30f8fe9c
      Sven Eckelmann authored
      The support for unicast fragmentation was implemented in commit
      9b3eab61754d ("batman-adv: Receive fragmented packets and merge"). The
      support to identify such packets by batctl's tcpdump was never implemented.
      
      This minimal implementation allows to identify these packets but is not
      able to reassemble the packets. Wireshark should be used when this advanced
      feature is required.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      30f8fe9c
    • Sven Eckelmann's avatar
      batctl: tcpdump: Add support for MCAST TVLV · 2c9c712a
      Sven Eckelmann authored
      The multicast support in batman-adv was introduced in commit 77ec494490d6
      ("batman-adv: Announce new capability via multicast TVLV") but the tcpdump
      parser was not updated to parse this TVLV container.
      
      The parser requires support of parsing the current TVLV container (v2) and
      the pre-bridging implementation (v1) to correctly show all TVLVs of OGMs
      (and related packets).
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      2c9c712a
  10. 24 May, 2019 1 commit
  11. 23 May, 2019 5 commits
  12. 05 May, 2019 2 commits
    • Sven Eckelmann's avatar
      batctl: Drop support for translating destinations via debugfs · 68d5acea
      Sven Eckelmann authored
      The support for getting the necessary data for translating traceroute/ping
      destinations via netlink was added 3 years ago to batman-adv. The old
      debugfs functionality is also currently disabled by default and will be
      dropped completely in 2021.
      
      These convenience helpers are now dropped as first step to get rid of
      debugfs functionality in batctl. They are still provided when batman-adv
      provides the generic batadv netlink family.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      68d5acea
    • Sven Eckelmann's avatar
      batctl: Drop log subcommand · ca6f2137
      Sven Eckelmann authored
      The correct way to get a log of the activities of batman-adv is to use the
      standard kernel tracing infrastructure:
      
        $ trace-cmd stream -e batadv:batadv_dbg
      
      The batman-adv specific log file will be removed in the future when the
      debugfs is dropped. And even for kernels without tracing support, most of
      the functionality (except mac address to bat_hosts translation) can be
      replaced by a simple:
      
        $ cat /sys/kernel/debug/batman_adv/bat0/log
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      ca6f2137
  13. 15 Apr, 2019 1 commit
  14. 14 Apr, 2019 3 commits
    • Sven Eckelmann's avatar
      batctl: Add netlink fallback for sysfs' iface_status · ef663129
      Sven Eckelmann authored
      The batman-adv kernel module can now be compiled without support for sysfs.
      But the status of an interface in the list generated by `batctl interface`
      can only get the status via the per hardif sysfs file iface_status. To
      still have some information, fallback to BATADV_CMD_GET_HARDIF if the sysfs
      file is not available.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      ef663129
    • Sven Eckelmann's avatar
      batctl: Reimplement VLAN translation using helper · dd437284
      Sven Eckelmann authored
      The functionality to translate VLAN interfaces to mesh interfaces and VID
      is using NETLINK_ROUTE like the query_rtnl_link_single helper function.
      Only minimal changes are required to also provide the link to the
      underlying device and the VID.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      dd437284
    • Sven Eckelmann's avatar
      batctl: Support checking of meshif without sysfs · 07967cd1
      Sven Eckelmann authored
      batctl checks whether the supplied interface is a batadv interface. And for
      hardif filters, whether this hardif is part of the selected meshif. This
      was done traditionally using the sysfs files which batman-adv creates.
      
      It is now possible to build the kernel module without sysfs support. These
      checks must therefore also work when sysfs is not available. And since the
      sysfs interface support was replaced in batctl by netlink commands, the
      check should also be implemented using using NETLINK_ROUTE.
      Signed-off-by: 's avatarSven Eckelmann <sven@narfation.org>
      07967cd1
  15. 28 Mar, 2019 6 commits