manager: fix assumption of child connections with autoconnect=no
authorBeniamino Galvani <bgalvani@redhat.com>
Tue, 8 Mar 2016 11:02:54 +0000 (12:02 +0100)
committerBeniamino Galvani <bgalvani@redhat.com>
Wed, 9 Mar 2016 08:48:44 +0000 (09:48 +0100)
commite80fc0566a68bb0802d4e525ca9d9bdc8c43000d
tree354bf937b2c5730bea1725cb015aee170dc1f616
parenta939a665a1d4409a694d50f659bc8829cea0c038
manager: fix assumption of child connections with autoconnect=no

During startup, when a link is detected (enp0s25 in the example below)
we try to create also virtual devices (ipip1) on it through
system_create_virtual_device(), however this realizes only devices for
connections which can autoactivate.

To support the assumption of child devices with autoconnect=no, we
should take in consideration in retry_connections_for_parent_device()
only connections for which the link does not exist, and let existing
links be handled by platform_link_added(), which also realizes them.

Reproducer:
 $ nmcli c add type ip-tunnel ifname ipip1 con-name ipip1+ autoconnect no \
               mode ipip remote 172.25.16.1 dev enp0s25 ip4 1.2.3.4/31
 $ nmcli c up ipip1+
 $ systemctl restart NetworkManager

Result:
 * before: ipip1+ is not assumed, ipip1 is not present in 'nmcli d' output
 * after:  ipip1+ is assumed, ipip1 detected
src/nm-manager.c