device: don't try to start LLDP listener if no link is available

L3-only devices don't have an ifindex during stage2, don't try to
start LLDP on them.

Fixes: 07a9364d9c
This commit is contained in:
Beniamino Galvani
2016-09-02 08:39:17 +02:00
parent e54b6c2bd5
commit 7203769fd0

View File

@@ -4044,7 +4044,7 @@ activate_stage2_device_config (NMDevice *self)
nm_device_queue_recheck_assume (info->slave);
}
if (lldp_rx_enabled (self)) {
if (lldp_rx_enabled (self) && priv->ifindex > 0) {
gs_free_error GError *error = NULL;
gconstpointer addr;
size_t addr_length;