diff options
-rw-r--r-- | src/devices/nm-device-veth.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/devices/nm-device-veth.c b/src/devices/nm-device-veth.c index 6a05cc3214..30994971ec 100644 --- a/src/devices/nm-device-veth.c +++ b/src/devices/nm-device-veth.c @@ -96,6 +96,15 @@ get_peer (NMDeviceVeth *self) return priv->peer; } +static gboolean +can_unmanaged_external_down (NMDevice *self) +{ + /* Unless running in a container, an udev rule causes these to be + * unmanaged. If there's no udev then we're probably in a container + * and should IFF_UP and configure the veth ourselves even if we + * didn't create it. */ + return FALSE; +} /**************************************************************/ @@ -140,12 +149,15 @@ static void nm_device_veth_class_init (NMDeviceVethClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); + NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); g_type_class_add_private (klass, sizeof (NMDeviceVethPrivate)); object_class->get_property = get_property; object_class->dispose = dispose; + device_class->can_unmanaged_external_down = can_unmanaged_external_down; + /* properties */ g_object_class_install_property (object_class, PROP_PEER, |