public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH 0/7] batctl: rtnetlink interface manipulation
@ 2016-07-13 15:29 Sven Eckelmann
  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
  0 siblings, 1 reply; 13+ messages in thread
From: Sven Eckelmann @ 2016-07-13 15:29 UTC (permalink / raw)
  To: b.a.t.m.a.n

[-- 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 --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-09-21  5:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 15:29 [B.A.T.M.A.N.] [PATCH 0/7] batctl: rtnetlink interface manipulation Sven Eckelmann
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox