From 446751b9c32d390ec475b2dc7ab51d5c09887afa5e92b47a4152ce84e2729525 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Thu, 11 Dec 2014 12:44:47 +0000 Subject: [PATCH] Accepting request 264780 from home:tsaupe:branches:Base:System fix systemd-nspawn --network-veth support (bnc#906709) OBS-URL: https://build.opensuse.org/request/show/264780 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=830 --- 513-nspawn-veth.patch | 39 +++++++++++++++++++++++++++++++++++++++ systemd-mini.changes | 6 ++++++ systemd-mini.spec | 3 +++ systemd.changes | 6 ++++++ systemd.spec | 3 +++ 5 files changed, 57 insertions(+) create mode 100644 513-nspawn-veth.patch diff --git a/513-nspawn-veth.patch b/513-nspawn-veth.patch new file mode 100644 index 00000000..b24ecf6c --- /dev/null +++ b/513-nspawn-veth.patch @@ -0,0 +1,39 @@ +diff -Naur systemd-210/src/libsystemd/sd-rtnl/rtnl-message.c systemd-210.mod/src/libsystemd/sd-rtnl/rtnl-message.c +--- systemd-210/src/libsystemd/sd-rtnl/rtnl-message.c 2014-11-19 13:10:23.998310815 +0100 ++++ systemd-210.mod/src/libsystemd/sd-rtnl/rtnl-message.c 2014-12-08 12:03:18.059734333 +0100 +@@ -722,6 +722,7 @@ + + int sd_rtnl_message_open_container(sd_rtnl_message *m, unsigned short type) { + uint16_t rtm_type; ++ int r; + + assert_return(m, -EINVAL); + assert_return(!m->sealed, -EPERM); +@@ -729,15 +730,21 @@ + sd_rtnl_message_get_type(m, &rtm_type); + + if (rtnl_message_type_is_link(rtm_type)) { +- + if ((type == IFLA_LINKINFO && m->n_containers == 0) || + (type == IFLA_INFO_DATA && m->n_containers == 1 && +- GET_CONTAINER(m, 0)->rta_type == IFLA_LINKINFO)) +- return add_rtattr(m, type, NULL, 0); +- else if (type == VETH_INFO_PEER && m->n_containers == 2 && ++ GET_CONTAINER(m, 0)->rta_type == IFLA_LINKINFO)) { ++ r = add_rtattr(m, type, NULL, 0); ++ if ( r > 0) ++ m->container_offsets[m->n_containers ++] = r; ++ return r; ++ } else if (type == VETH_INFO_PEER && m->n_containers == 2 && + GET_CONTAINER(m, 1)->rta_type == IFLA_INFO_DATA && +- GET_CONTAINER(m, 0)->rta_type == IFLA_LINKINFO) +- return add_rtattr(m, type, NULL, sizeof(struct ifinfomsg)); ++ GET_CONTAINER(m, 0)->rta_type == IFLA_LINKINFO) { ++ r = add_rtattr(m, type, NULL, sizeof(struct ifinfomsg)); ++ if ( r > 0) ++ m->container_offsets[m->n_containers ++] = r; ++ return r; ++ } + } + + return -ENOTSUP; diff --git a/systemd-mini.changes b/systemd-mini.changes index c5007350..723c5172 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 11 09:32:31 UTC 2014 - thomas.blume@suse.com + +- fix systemd-nspawn network-veth support (bnc#906709) + add 513-nspawn-veth.patch + ------------------------------------------------------------------- Fri Dec 5 12:13:02 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 1a567741..865c9716 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1048,6 +1048,8 @@ Patch510: 0003-sd-bus-refuse-properties-that-claim-to-be-both-writa.patch Patch511: 0001-units-make-sure-rfkill-service-is-bount-to-the-actua.patch # PATCH-FIX-UPSTREAM added at 2014/12/05 Patch512: 0002-rfkill-rework-how-we-generate-file-names-from-rfkill.patch +# PATCH-FIX-SUSE 513-nspawn-veth.patch (bnc#906709) +Patch513: 513-nspawn-veth.patch # UDEV PATCHES # ============ @@ -1922,6 +1924,7 @@ cp %{SOURCE7} m4/ %patch510 -p0 %patch511 -p0 %patch512 -p0 +%patch513 -p1 # udev patches %patch1001 -p1 diff --git a/systemd.changes b/systemd.changes index c5007350..723c5172 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 11 09:32:31 UTC 2014 - thomas.blume@suse.com + +- fix systemd-nspawn network-veth support (bnc#906709) + add 513-nspawn-veth.patch + ------------------------------------------------------------------- Fri Dec 5 12:13:02 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 4332b4be..09e739dc 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1043,6 +1043,8 @@ Patch510: 0003-sd-bus-refuse-properties-that-claim-to-be-both-writa.patch Patch511: 0001-units-make-sure-rfkill-service-is-bount-to-the-actua.patch # PATCH-FIX-UPSTREAM added at 2014/12/05 Patch512: 0002-rfkill-rework-how-we-generate-file-names-from-rfkill.patch +# PATCH-FIX-SUSE 513-nspawn-veth.patch (bnc#906709) +Patch513: 513-nspawn-veth.patch # UDEV PATCHES # ============ @@ -1917,6 +1919,7 @@ cp %{SOURCE7} m4/ %patch510 -p0 %patch511 -p0 %patch512 -p0 +%patch513 -p1 # udev patches %patch1001 -p1