fix systemd-nspawn --network-veth support (bnc#906709)
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=830
This commit is contained in:
parent
ed778876a8
commit
0abb04e9ca
39
513-nspawn-veth.patch
Normal file
39
513-nspawn-veth.patch
Normal file
@ -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;
|
@ -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
|
Fri Dec 5 12:13:02 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
@ -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
|
Patch511: 0001-units-make-sure-rfkill-service-is-bount-to-the-actua.patch
|
||||||
# PATCH-FIX-UPSTREAM added at 2014/12/05
|
# PATCH-FIX-UPSTREAM added at 2014/12/05
|
||||||
Patch512: 0002-rfkill-rework-how-we-generate-file-names-from-rfkill.patch
|
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
|
# UDEV PATCHES
|
||||||
# ============
|
# ============
|
||||||
@ -1922,6 +1924,7 @@ cp %{SOURCE7} m4/
|
|||||||
%patch510 -p0
|
%patch510 -p0
|
||||||
%patch511 -p0
|
%patch511 -p0
|
||||||
%patch512 -p0
|
%patch512 -p0
|
||||||
|
%patch513 -p1
|
||||||
|
|
||||||
# udev patches
|
# udev patches
|
||||||
%patch1001 -p1
|
%patch1001 -p1
|
||||||
|
@ -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
|
Fri Dec 5 12:13:02 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
@ -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
|
Patch511: 0001-units-make-sure-rfkill-service-is-bount-to-the-actua.patch
|
||||||
# PATCH-FIX-UPSTREAM added at 2014/12/05
|
# PATCH-FIX-UPSTREAM added at 2014/12/05
|
||||||
Patch512: 0002-rfkill-rework-how-we-generate-file-names-from-rfkill.patch
|
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
|
# UDEV PATCHES
|
||||||
# ============
|
# ============
|
||||||
@ -1917,6 +1919,7 @@ cp %{SOURCE7} m4/
|
|||||||
%patch510 -p0
|
%patch510 -p0
|
||||||
%patch511 -p0
|
%patch511 -p0
|
||||||
%patch512 -p0
|
%patch512 -p0
|
||||||
|
%patch513 -p1
|
||||||
|
|
||||||
# udev patches
|
# udev patches
|
||||||
%patch1001 -p1
|
%patch1001 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user