From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 0/7] batctl: rtnetlink interface manipulation
Date: Wed, 13 Jul 2016 17:29:35 +0200 [thread overview]
Message-ID: <35819279.yt4EnXKmx6@bentobox> (raw)
[-- Attachment #1: Type: text/plain, Size: 2723 bytes --]
Hi,
the sysfs file mesh_iface to add/remove interfaces to/from a batman-adv
soft-interface was downgraded in batman-adv master to a second-class citizen.
This was done because it has conceptional problems (for example locking of
sysfs vs. locking of the network core code). The only direct way to modify
interfaces is rtnetlink which is used by different tools like iproute2 (ip
link, ip addr, ...) or netifd. sysfs still exists but has to use workers which
delay the actual add/del to a later point.
This patchset now moves batctl to rtnetlink instead of the sysfs-file
mesh_iface. This should work fine since this is supported by batman-adv (in
Linux) since Linux v3.10 (batman-adv v2013.2).
This patchset also introduces two new interface subcommands called "new" and
"destroy". "new" can be used to create a batman-adv interface without any
interface attached. This is helpful when the interfaces should be configured
independently of the first attached interface. The command "destroy" can be
used to destroy a batman-adv interface without going through all attached
interfaces and delete them manually.
It is now also possible to tell batctl to not automatically create a
batman-adv interface when an interface is attached. But more important is this
option to disable the automatic removal of a batman-adv interface when all
attached interfaces were removed. This is useful when a number of interfaces
should be added/removed without accidentally loosing the current configuration
of the interface. Of course, we should also accept the related patch for
batman-adv [1].
I've also added two patches with some minor cleanup because it was dealing
with code in the same file with similar context.
This patchset is build on top of the netlink patchset currently waiting to be
applied.
Kind regards,
Sven
[1] https://patchwork.open-mesh.org/patch/16499/
Sven Eckelmann (7):
batctl: Use rtnl to query list of softif devices
batctl: Add command to create/destroy batman-adv interface
batctl: Use rtnl to add/remove interfaces
batctl: Parse interface arguments relative to last parsed option
batctl: Allow to disable automatic interface new/destroy
batctl: Move interface command to extra file
batctl: Move check_mesh_iface* to functions.c
Makefile | 1 +
functions.c | 181 +++++++++++++++++++++++
functions.h | 10 +-
interface.c | 457 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
interface.h | 29 ++++
main.c | 1 +
man/batctl.8 | 7 +-
sys.c | 215 +---------------------------
sys.h | 3 -
9 files changed, 690 insertions(+), 214 deletions(-)
create mode 100644 interface.c
create mode 100644 interface.h
--
2.8.1
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next reply other threads:[~2016-07-13 15:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 15:29 Sven Eckelmann [this message]
2016-07-13 15:30 ` [B.A.T.M.A.N.] [PATCH 1/7] batctl: Use rtnl to query list of softif devices Sven Eckelmann
2016-07-13 15:30 ` [B.A.T.M.A.N.] [PATCH 2/7] batctl: Add command to create/destroy batman-adv interface Sven Eckelmann
2016-09-20 14:24 ` Linus Lüssing
2016-09-20 15:43 ` Sven Eckelmann
2016-09-21 5:59 ` jmh8
2016-07-13 15:30 ` [B.A.T.M.A.N.] [PATCH 3/7] batctl: Use rtnl to add/remove interfaces Sven Eckelmann
2016-07-13 15:30 ` [B.A.T.M.A.N.] [PATCH 4/7] batctl: Parse interface arguments relative to last parsed option Sven Eckelmann
2016-07-13 15:30 ` [B.A.T.M.A.N.] [PATCH 5/7] batctl: Allow to disable automatic interface new/destroy Sven Eckelmann
2016-09-20 14:29 ` Linus Lüssing
2016-09-20 15:36 ` Sven Eckelmann
2016-07-13 15:30 ` [B.A.T.M.A.N.] [PATCH 6/7] batctl: Move interface command to extra file Sven Eckelmann
2016-07-13 15:30 ` [B.A.T.M.A.N.] [PATCH 7/7] batctl: Move check_mesh_iface* to functions.c Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35819279.yt4EnXKmx6@bentobox \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox