From 8ecbe53f377184896d7f57ea57f77c3ea60d0f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Wed, 16 Oct 2013 17:28:04 +0200 Subject: [PATCH] platform: log links in event_notification() in debug mode --- src/platform/nm-linux-platform.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 519a570dd7..7b95843a3a 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -1183,7 +1183,14 @@ event_notification (struct nl_msg *msg, gpointer user_data) cached_object = nl_cache_search (cache, object); kernel_object = get_kernel_object (priv->nlh, object); - debug ("netlink event (type %d)", event); + /* Just for debugging */ + if (object_type_from_nl_object (object) == LINK) { + int ifindex = rtnl_link_get_ifindex ((struct rtnl_link *) object); + const char *name = rtnl_link_get_name ((struct rtnl_link *) object); + debug ("netlink event (type %d) for link: %s (%d)", + event, name ? name : "(unknown)", ifindex); + } else + debug ("netlink event (type %d)", event); hack_empty_master_iff_lower_up (platform, kernel_object);