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

Dan Williams dcbw at redhat.com
Tue Nov 4 12:48:47 PST 2014


On Tue, 2014-11-04 at 19:40 +0100, Lennart Poettering wrote:
> 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.

firewalld can't get the information that WiFi network Starbucks should
be locked down more than your home network.  How is it supposed to get
that information just listening to rtnl or other kernel events?  The
kernel doesn't care; the only source of that information is the
connection manager.

Dan



More information about the systemd-devel mailing list