Commit df6ebb6f authored by Michael Biebl's avatar Michael Biebl

Fix --network-interface in systemd-nspawn

Do not fail when modifying an existing link.

Closes: #813696
parent 447f0bc1
......@@ -16,6 +16,8 @@ systemd (215-17+deb8u4) UNRELEASED; urgency=medium
* Only skip the filesystem check for /usr if the /run/initramfs/fsck-usr
flag file exists. Otherwise we break booting with dracut which uses
systemd inside the initramfs. (Closes: #810748)
* Fix --network-interface in systemd-nspawn to not fail when modifying an
existing link. (Closes: #813696)
-- Martin Pitt <mpitt@debian.org> Sat, 09 Jan 2016 16:24:05 +0100
......
From: Tom Gundersen <teg@jklm.no>
Date: Thu, 28 Aug 2014 12:15:51 +0200
Subject: nspawn: fix --network-interface
Use SETLINK when modifying an existing link.
---
src/nspawn/nspawn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index c13e625..85191ce 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1760,7 +1760,7 @@ static int move_network_interfaces(pid_t pid) {
if (ifi < 0)
return ifi;
- r = sd_rtnl_message_new_link(rtnl, &m, RTM_NEWLINK, ifi);
+ r = sd_rtnl_message_new_link(rtnl, &m, RTM_SETLINK, ifi);
if (r < 0) {
log_error("Failed to allocate netlink message: %s", strerror(-r));
return r;
......@@ -157,6 +157,7 @@ core-only-set-the-kernel-s-timezone-when-the-RTC-runs-in-.patch
delta-Fix-broken-separator-support.patch
sd-dhcp-client-make-request-broadcasts-configurable.patch
make-sure-all-swap-units-are-ordered-before-the-swap-targ.patch
nspawn-fix-network-interface.patch
## Debian specific patches:
Add-back-support-for-Debian-specific-config-files.patch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment