summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2017-06-30 17:49:44 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2017-08-05 08:03:16 +0200
commit695f6ceebb7c2cc96e50e3156e7938616e021553 (patch)
treea8187232b207b91297d4c350bc7ab31e6396fe01
parent8665cdfefff50bb575eb03893d6361930bc8ad40 (diff)
downloadNetworkManager-695f6ceebb7c2cc96e50e3156e7938616e021553.tar.gz
device: accept NULL plink
For PPP devices we can't create a link in advance, as the link is created by pppd when the connection is established.
-rw-r--r--src/devices/nm-device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 1530b60716..321f7cf8ca 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -2911,8 +2911,10 @@ nm_device_create_and_realize (NMDevice *self,
if (NM_DEVICE_GET_CLASS (self)->create_and_realize) {
if (!NM_DEVICE_GET_CLASS (self)->create_and_realize (self, connection, parent, &plink, error))
return FALSE;
- plink_copy = *plink;
- plink = &plink_copy;
+ if (plink) {
+ plink_copy = *plink;
+ plink = &plink_copy;
+ }
}
realize_start_setup (self, plink,