[systemd-devel] [question] networkd: Any support for hooks?

Lennart Poettering lennart at poettering.net
Tue Nov 4 10:40:16 PST 2014


BOn Tue, 04.11.14 19:07, Tomasz Torcz (tomek at pipebreaker.pl) wrote:

> On Thu, Oct 02, 2014 at 08:36:10AM +0200, Lennart Poettering wrote:
> > On Wed, 01.10.14 21:36, Cameron Norman (camerontnorman at gmail.com) wrote:
> > 
> > > Hello,
> > > 
> > > ifupdown [1], NetworkManager, and WICD all support hooks for when a
>1;3409;0c > > network interface is configured or deconfigured (before and after
> > > these actions).
> > > 
> > > Are there any plans to support something along these lines? If so,
> > > what will that look like?
> > > 
> > > If there are no plans, how do networkd's developers feel about adding
> > > the feature (will not merge, or will accept patches, etc.) ?
> > 
> > Can you be more specific what precisely you intend to hook in there?
> > I'd really prefer if we could find different solutions for the common
> > usecases.
> 
>   Example: I'd like to add interface to proper firewalld "zone".
> Ideally it could be done by networkd itself (it just one dbus call:
> addInterface(in  s zone, in  s interface, …) based on new Zone=string
> setting in .netdev file.
>   Hook can determine which zone interface should belong to and call
> firewall-cmd --zone=<zone> --add-interface=<interface>

If firewalld shall be dynamic then it really should listen to rtnl on
its own. It's the wrong way round, you don't want to to call into
higher level software from lower level one. It's the higher level
software that should subscribe to changes from the lower level software.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list