about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2014-12-31 01:04:08 +0100
committerMichael Biebl <biebl@debian.org>2014-12-31 01:04:11 +0100
commitfe49d5b66dfaab48ae8ef68f33535cb32ef18c46 (patch)
treed6e62b2134982ac7115568ca216c7dc16877319a
parentaa8a3143e9635323f7a3d11bd1cc313825f8866f (diff)
Cherry-pick upstream commit to not override external route metrics
Cherry-pick upstream commit which prevents breaking PtP TUN interfaces
by not overriding external route metrics.

Closes: #767002
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/0015-core-don-t-override-external-route-metrics.patch61
-rw-r--r--debian/patches/series1
3 files changed, 69 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index bca159d6..636bd5ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+network-manager (0.9.10.0-5) UNRELEASED; urgency=medium
+
+  * Cherry-pick upstream commit which prevents breaking PtP TUN interfaces by
+    not overriding external route metrics. (Closes: #767002)
+
+ -- Michael Biebl <biebl@debian.org>  Wed, 31 Dec 2014 00:59:36 +0100
+
 network-manager (0.9.10.0-4) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/0015-core-don-t-override-external-route-metrics.patch b/debian/patches/0015-core-don-t-override-external-route-metrics.patch
new file mode 100644
index 00000000..612083c7
--- /dev/null
+++ b/debian/patches/0015-core-don-t-override-external-route-metrics.patch
@@ -0,0 +1,61 @@
+From 404f23a93198d0b5e81b87d6d55a479838e934cf Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw@redhat.com>
+Date: Mon, 13 Oct 2014 16:27:20 -0500
+Subject: [PATCH 1/2] core: don't override external route metrics (bgo #738268)
+
+A generated connection contains a copy of the device's existing
+configuration, so it's entirely redundant to merge the connection
+back into the device's IP config.  But even though that should
+result in no changes to the IP config, NMSettingIPxConfig treats a
+route metric of '0' as the device priority, while NMIPxConfig
+allows 0 as a valid route metric.  Since the setting values
+are preferred (they are supposed to be user-supplied and thus
+override anythign else, but in this case they are generated and
+thus not user-supplied) external routes with a metric of 0 are
+overwritten with the device priority metric.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=738268
+(cherry picked from commit 8283672451d0b07655a8423af0e17fd26c07a0d1)
+---
+ src/devices/nm-device.c | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
+index 4788a60..05f0e7b 100644
+--- a/src/devices/nm-device.c
++++ b/src/devices/nm-device.c
+@@ -2635,9 +2635,13 @@ ip4_config_merge_and_apply (NMDevice *self,
+ 	if (priv->ext_ip4_config)
+ 		nm_ip4_config_merge (composite, priv->ext_ip4_config);
+ 
+-	/* Merge user overrides into the composite config */
++	/* Merge user overrides into the composite config.  Generated+assumed
++	 * connections come from the system not the user and merging them would
++	 * be redundant, so don't bother.
++	 */
+ 	connection = nm_device_get_connection (self);
+-	if (connection) {
++	if (   connection
++	    && !nm_settings_connection_get_nm_generated (NM_SETTINGS_CONNECTION (connection))) {
+ 		nm_ip4_config_merge_setting (composite,
+ 		                             nm_connection_get_setting_ip4_config (connection),
+ 		                             nm_device_get_priority (self));
+@@ -3080,9 +3084,13 @@ ip6_config_merge_and_apply (NMDevice *self,
+ 	if (priv->ext_ip6_config)
+ 		nm_ip6_config_merge (composite, priv->ext_ip6_config);
+ 
+-	/* Merge user overrides into the composite config */
++	/* Merge user overrides into the composite config.  Generated+assumed
++	 * connections come from the system not the user and merging them would
++	 * be redundant, so don't bother.
++	 */
+ 	connection = nm_device_get_connection (self);
+-	if (connection) {
++	if (   connection
++	    && !nm_settings_connection_get_nm_generated (NM_SETTINGS_CONNECTION (connection))) {
+ 		nm_ip6_config_merge_setting (composite,
+ 		                             nm_connection_get_setting_ip6_config (connection),
+ 		                             nm_device_get_priority (self));
+-- 
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 345726d6..550ae5a3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@
 0012-fix-arping-path.patch
 0013-fix-dhclient-abnormal-exit-due-to-SIGPIPE.patch
 0014-log-DHCLIENT-exit-status-better.patch
+0015-core-don-t-override-external-route-metrics.patch