From cbfdb72db2686e0683edf8a00a0770b32aeb5ad0 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 22 Oct 2016 13:46:02 +0200 Subject: [PATCH] ifcfg-rh: fix signature of link_changed() callback Depending on how arguments are passed to the called function, this could lead to a crash. Maybe not on 32 bit machines where the size of the pointer is the size of an int. Maybe not on x86_64, where the arguments are passed in registers. Fixes: b88c309167f4073e1503bb044b0c3a40299977cd (cherry picked from commit 548a5440e967aca7c281fda03a09d9006f394695) --- src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c index 184e95b2aa..a83bd35d79 100644 --- a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c +++ b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c @@ -106,7 +106,7 @@ devtimeout_ready (gpointer user_data) } static void -link_changed (NMPlatform *platform, NMPObjectType *obj_type, int ifindex, const NMPlatformLink *link, +link_changed (NMPlatform *platform, NMPObjectType obj_type, int ifindex, const NMPlatformLink *link, NMPlatformSignalChangeType change_type, NMConnection *self) { @@ -117,7 +117,6 @@ link_changed (NMPlatform *platform, NMPObjectType *obj_type, int ifindex, const if (g_strcmp0 (link->name, ifname) != 0) return; - /* Shouldn't happen, but... */ if (change_type == NM_PLATFORM_SIGNAL_REMOVED) return;