[NetworkManager] core: add some debugging to help diagnose netlink errors (rh #1029213)
Dan Winship
danw at fedoraproject.org
Mon Nov 18 17:58:28 UTC 2013
commit 9e072a43adc71269802b051b54de4349b203a73b
Author: Dan Williams <dcbw at redhat.com>
Date: Wed Nov 13 20:17:59 2013 -0600
core: add some debugging to help diagnose netlink errors (rh #1029213)
NetworkManager.spec | 7 +++-
rh1029213-debug-netlink-add-errors.patch | 50 ++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/NetworkManager.spec b/NetworkManager.spec
index 18b1bf4..2937903 100644
--- a/NetworkManager.spec
+++ b/NetworkManager.spec
@@ -19,7 +19,7 @@ Name: NetworkManager
Summary: Network connection manager and user applications
Epoch: 1
Version: 0.9.9.0
-Release: 15%{snapshot}%{?dist}
+Release: 16%{snapshot}%{?dist}
Group: System Environment/Base
License: GPLv2+
URL: http://www.gnome.org/projects/NetworkManager/
@@ -33,6 +33,7 @@ Patch3: rh1021112-fix-crash-never-default.patch
Patch4: rh1019021-fix-crash-ip6-routing.patch
Patch5: rh1025007-fix-crash-ifcfg-rh.patch
Patch6: rh1012151-ipv6-disable.patch
+Patch7: rh1029213-debug-netlink-add-errors.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -162,6 +163,7 @@ deployments.
%patch4 -p1 -b .patch4
%patch5 -p1 -b .patch5
%patch6 -p1 -b .patch6
+%patch7 -p1 -b .patch7
%build
@@ -360,6 +362,9 @@ fi
%config %{_sysconfdir}/%{name}/conf.d/00-server.conf
%changelog
+* Wed Nov 13 2013 Dan Williams <dcbw at redhat.com> - 0.9.9.0-16.git20131003
+- core: add some debugging to help diagnose netlink errors (rh #1029213)
+
* Fri Nov 8 2013 Jiří Klimeš <jklimes at redhat.com> - 0.9.9.0-15.git20131003
- ifcfg-rh: fix crash in ifcfg-rh plugin when reloading connections (rh #1023571)
- ifcfg-rh: fix crash when having connections with NEVER_DEFAULT (rh #1021112)
diff --git a/rh1029213-debug-netlink-add-errors.patch b/rh1029213-debug-netlink-add-errors.patch
new file mode 100644
index 0000000..3609960
--- /dev/null
+++ b/rh1029213-debug-netlink-add-errors.patch
@@ -0,0 +1,50 @@
+From 2086cab1273b26630840e3a0c092e8b1617e803b Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw at redhat.com>
+Date: Wed, 13 Nov 2013 20:06:39 -0600
+Subject: [PATCH] platform: dump objects that fail to be added (rh #1029213)
+
+Attempt to figure out why the objects fail.
+---
+ src/platform/nm-linux-platform.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
+index a35b0cc..d13abbe 100644
+--- a/src/platform/nm-linux-platform.c
++++ b/src/platform/nm-linux-platform.c
+@@ -1100,27 +1100,32 @@ refresh_object (NMPlatform *platform, struct nl_object *object, gboolean removed
+ /* Decreases the reference count if @obj for convenience */
+ static gboolean
+ add_object (NMPlatform *platform, struct nl_object *obj)
+ {
+ auto_nl_object struct nl_object *object = obj;
+ NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform);
+ int nle;
++ struct nl_dump_params dp = {
++ .dp_type = NL_DUMP_DETAILS,
++ .dp_fd = stderr,
++ };
+
+ nle = add_kernel_object (priv->nlh, object);
+
+ /* NLE_EXIST is considered equivalent to success to avoid race conditions. You
+ * never know when something sends an identical object just before
+ * NetworkManager.
+ */
+ switch (nle) {
+ case -NLE_SUCCESS:
+ case -NLE_EXIST:
+ break;
+ default:
+ error ("Netlink error: %s", nl_geterror (nle));
++ nl_object_dump (object, &dp);
+ return FALSE;
+ }
+
+ return refresh_object (platform, object, FALSE, NM_PLATFORM_REASON_INTERNAL);
+ }
+
+ /* Decreases the reference count if @obj for convenience */
+--
+1.8.3.1
+
More information about the scm-commits
mailing list