Change-Id: Ic5f3d99c884886897eac9c6f24b7dece20c836e7
(cherry picked from commit 25d533332135f55600e8cf183cb559dd0453e386)
Reviewed-on: http://photon-jenkins.eng.vmware.com/292
Reviewed-by: suezzelur <anishs@vmware.com>
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,37 @@ |
| 0 |
+From e5d44b34cca39a335b8976328a14f47e2d7ef3b9 Mon Sep 17 00:00:00 2001 |
|
| 1 |
+From: Christian Hesse <mail@eworm.de> |
|
| 2 |
+Date: Wed, 25 Nov 2015 08:46:43 +0100 |
|
| 3 |
+Subject: [PATCH] networkd: link - do not drop config for loopback device |
|
| 4 |
+ |
|
| 5 |
+Commit 5e5b137a (networkd: link - drop foreign config when configuring |
|
| 6 |
+link) introduced a regression where addresses (including 127.0.0.1) are |
|
| 7 |
+removed from loopback device. |
|
| 8 |
+Do not handle loopback device when removing foreign configs. |
|
| 9 |
+ |
|
| 10 |
+Signed-off-by: Christian Hesse <mail@eworm.de> |
|
| 11 |
+--- |
|
| 12 |
+ src/network/networkd-link.c | 10 +++++++--- |
|
| 13 |
+ 1 file changed, 7 insertions(+), 3 deletions(-) |
|
| 14 |
+ |
|
| 15 |
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c |
|
| 16 |
+index 64a4b74..a9d91b0 100644 |
|
| 17 |
+--- a/src/network/networkd-link.c |
|
| 18 |
+@@ -2040,9 +2040,13 @@ static int link_configure(Link *link) {
|
|
| 19 |
+ assert(link->network); |
|
| 20 |
+ assert(link->state == LINK_STATE_PENDING); |
|
| 21 |
+ |
|
| 22 |
+- r = link_drop_foreign_config(link); |
|
| 23 |
+- if (r < 0) |
|
| 24 |
+- return r; |
|
| 25 |
++ /* Drop foreign config, but ignore loopback device. |
|
| 26 |
++ * We do not want to remove loopback address. */ |
|
| 27 |
++ if (!(link->flags & IFF_LOOPBACK)) {
|
|
| 28 |
++ r = link_drop_foreign_config(link); |
|
| 29 |
++ if (r < 0) |
|
| 30 |
++ return r; |
|
| 31 |
++ } |
|
| 32 |
+ |
|
| 33 |
+ r = link_set_bridge_fdb(link); |
|
| 34 |
+ if (r < 0) |
|
| 35 |
+ |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
Summary: Systemd-228 |
| 2 | 2 |
Name: systemd |
| 3 | 3 |
Version: 228 |
| 4 |
-Release: 1%{?dist}
|
|
| 4 |
+Release: 2%{?dist}
|
|
| 5 | 5 |
License: LGPLv2+ and GPLv2+ and MIT |
| 6 | 6 |
URL: http://www.freedesktop.org/wiki/Software/systemd/ |
| 7 | 7 |
Group: System Environment/Security |
| ... | ... |
@@ -10,6 +10,7 @@ Distribution: Photon |
| 10 | 10 |
Source0: %{name}-%{version}.tar.gz
|
| 11 | 11 |
%define sha1 systemd=15475d874dc38f8d759f334bbcf7d8aff4b412da |
| 12 | 12 |
Patch1: 01-enoX-uses-instance-number-for-vmware-hv.patch |
| 13 |
+Patch2: systemd-228-loopback-address.patch |
|
| 13 | 14 |
#patch for ostree |
| 14 | 15 |
#Patch0: systemd-mount.patch |
| 15 | 16 |
Requires: Linux-PAM |
| ... | ... |
@@ -42,6 +43,7 @@ EOF |
| 42 | 42 |
sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h") |
| 43 | 43 |
#%patch0 -p1 |
| 44 | 44 |
%patch1 -p1 |
| 45 |
+%patch2 -p1 |
|
| 45 | 46 |
%build |
| 46 | 47 |
./autogen.sh |
| 47 | 48 |
./configure --prefix=%{_prefix} \
|
| ... | ... |
@@ -102,6 +104,8 @@ rm -rf %{buildroot}/*
|
| 102 | 102 |
|
| 103 | 103 |
|
| 104 | 104 |
%changelog |
| 105 |
+* Wed Dec 16 2015 Anish Swaminathan <anishs@vmware.com> 228-2 |
|
| 106 |
+- Patch for loopback address. |
|
| 105 | 107 |
* Fri Dec 11 2015 Anish Swaminathan <anishs@vmware.com> 228-1 |
| 106 | 108 |
- Upgrade systemd version. |
| 107 | 109 |
* Mon Nov 30 2015 Mahmoud Bassiouny <mbassiouny@vmware.com> 216-13 |