summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-11-25 18:33:35 +0100
committerThomas Haller <thaller@redhat.com>2020-11-25 18:48:40 +0100
commit5669df8fd60210aa11bd282e483cb587e17bd752 (patch)
tree99f701782d58972c3552e50f861a2b48592407e1
parent83e1b147a0112ff1ab7d73aece3de958f39a8f2e (diff)
downloadNetworkManager-th/pr/682.tar.gz
fixup! veth: add support to configure veth interfacesth/pr/682
It's not clear why these check for ifindex. Yes, NMDeviceEthernet does that too (why?), but NMDeviceBond does not. In general, for veth it only depends on the driver whether carrier detect is supported (and it always is).
-rw-r--r--src/devices/nm-device-veth.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/devices/nm-device-veth.c b/src/devices/nm-device-veth.c
index 3a5cb033b0..54400c3c49 100644
--- a/src/devices/nm-device-veth.c
+++ b/src/devices/nm-device-veth.c
@@ -118,12 +118,7 @@ create_and_realize(NMDevice * device,
static NMDeviceCapabilities
get_generic_capabilities(NMDevice *device)
{
- int ifindex = nm_device_get_ifindex(device);
-
- if (ifindex > 0)
- return NM_DEVICE_CAP_CARRIER_DETECT | NM_DEVICE_CAP_IS_SOFTWARE;
-
- return NM_DEVICE_CAP_IS_SOFTWARE;
+ return NM_DEVICE_CAP_CARRIER_DETECT | NM_DEVICE_CAP_IS_SOFTWARE;
}
static gboolean