From d213c3cd1a563b69dbe4684682bcec006ab5c88e Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 9 Apr 2020 16:13:18 +0200 Subject: [PATCH] device: fix assertion failure configuring bridge ports Fixes: 177ee2d7bf99 ('device/bridge: code cleanup in commit_option()') --- src/devices/nm-device-bridge.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/devices/nm-device-bridge.c b/src/devices/nm-device-bridge.c index dcfef0e100..c6c54344f6 100644 --- a/src/devices/nm-device-bridge.c +++ b/src/devices/nm-device-bridge.c @@ -329,7 +329,10 @@ commit_option (NMDevice *device, NMSetting *setting, const Option *option, gbool GParamSpec *pspec; const char *value; - nm_assert (NM_IS_SETTING_BRIDGE (setting)); + if (slave) + nm_assert (NM_IS_SETTING_BRIDGE_PORT (setting)); + else + nm_assert (NM_IS_SETTING_BRIDGE (setting)); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (setting), option->name); nm_assert (pspec);