[systemd-devel] How to wait for specific interface/IP?

Alexander E. Patrakov patrakov at gmail.com
Tue May 26 07:55:51 PDT 2015

26.05.2015 19:03, Lennart Poettering wrote:
> On Sat, 23.05.15 11:03, Ian Pilcher (arequipeno at gmail.com) wrote:
>> Is there a simple way to make a service require that a specific network
>> interface/IP address be active?
>> I have a manually set up bridge and dnsmasq configuration for my VM
>> traffic, but dnsmasq is getting started before NetworkManager has
>> configured the bridge and failing because it cannot bind to the bridge's
>> IP address.
> Well, for networkd, there's the systemd-networkd-wait-online tool that
> allows you to wait until a specific interface is up. Maybe NM supports
> something similar? Please ask NM folks for help.
> Also, dnsmasq should probably use IP_FREEBIND or so (at least
> optionally) so that it can work without requiring the interface to be
> up.

dnsmasq supports "--bind-dynamic" option, which is based not on 
IP_FREEBIND, but on notifications about new or disappearing interfaces 
and addresses.

The real problem here is with non-C languages. E.g. node.js, Java, 
Python 2.7 and even Go still have absolutely no support for IP_FREEBIND.

Alexander E. Patrakov

More information about the systemd-devel mailing list