Skip to content

batctl: Userspace batadv_icmp endpoints

Sven Eckelmann batman 1 version Applied

Status from this message: Applied in 315b3b0fac147b9d8dc8f83a6409fde91eca683a [1].

Get series with b4
b4 am 3501586.3dVhjbZHzy@sven-edge

Versions newest first

  1. v1 Latest4 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4batctl: Replace list implementation with linux-like-listMakefile bisect_iv.c bisect_iv.h +5 more+860 -2771 reply
2/4batctl: Use monotonic time source for icmp timingMakefile functions.c+10 -91 reply
3/4batctl: Add helper to generate instant random bytesfunctions.c functions.h+67 -00 replies
4/4batctl: Implement non-routing batadv_icmp in userspaceMakefile icmp_helper.c icmp_helper.h +4 more+895 -620 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [B.A.T.M.A.N.] [PATCH 0/4] batctl: Userspace batadv_icmp endpoints

Hi,

The current endpoint for batadv_icmp* is implemented in the kernel module and can be accessed via debugfs. But the debugfs cannot be accessed from non- default netns or when debugfs is disabled. Thus it has be possible to use it via the netlink infrastructure to make it compatible with future setups.

The use of the socket file is completely removed and instead raw sockets with BPF filters are used to send/receive batadv_icmp_packet* directly. All information about interfaces and available originators are received via rtnetlink and the batman-adv netlink.

The originators debugfs file is used when the batman-adv netlink commands are not available. The routing of batadv_icmp_packets is still done inside the kernel module.

The patchset is based on the netlink and rtnl patchset for batctl.

Kind regards,
Sven

Sven Eckelmann (4):
batctl: Replace list implementation with linux-like-list
batctl: Use monotonic time source for icmp timing
batctl: Add helper to generate instant random bytes
batctl: Implement non-routing batadv_icmp in userspace

 Makefile      |   4 +-
 bisect_iv.c   |  40 ++-
 bisect_iv.h   |  10 +-
 functions.c   |  82 +++++-
 functions.h   |   2 +
 icmp_helper.c | 633 ++++++++++++++++++++++++++++++++++++++++++++
 icmp_helper.h |  58 ++++
 list-batman.c | 123 ---------
 list-batman.h | 120 ---------
 list.h        | 834 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 netlink.c     | 178 ++++++++++++-
 netlink.h     |   3 +
 ping.c        |  42 +--
 tcpdump.c     |   7 +-
 tcpdump.h     |   2 +-
 traceroute.c  |  42 +--
 16 files changed, 1832 insertions(+), 348 deletions(-)
 create mode 100644 icmp_helper.c
 create mode 100644 icmp_helper.h
 delete mode 100644 list-batman.c
 delete mode 100644 list-batman.h
 create mode 100644 list.h