[systemd-devel] networkd D-Bus API for link up/down?
Lennart Poettering
lennart at poettering.net
Thu Sep 22 13:45:11 UTC 2022
On Mi, 21.09.22 06:48, Kevin P. Fleming (kevin at km6g.us) wrote:
> When the D-Bus API for systemd-networkd was added there were
> indications that it could be used for bringing links up and down.
> However, when I review the API docs at:
>
> https://www.freedesktop.org/software/systemd/man/org.freedesktop.network1.html#
>
> I don't see any methods for doing those operations. networkctl uses
> netlink messages for these operations as well.
>
> I want to create a cluster resource agent for Pacemaker which can
> manage networkd links, and using D-Bus would be easier than using
> netlink since there is already D-Bus support in the resource agent for
> systemd units.
This is currently not available. But do note that you can use
ActivationPolicy= in a .network file and then simply toggle the IFF_UP flag
on the net device, and networkd is happy.
If you don#t want to bother with rtnetlink for that you could even use
the old BSD ioctls, i.e. SIOCSIFFLAGS.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list