chiark / gitweb /
nspawn: fix --network-interface
authorTom Gundersen <teg@jklm.no>
Thu, 28 Aug 2014 10:15:51 +0000 (12:15 +0200)
committerTom Gundersen <teg@jklm.no>
Thu, 28 Aug 2014 10:16:07 +0000 (12:16 +0200)
Use SETLINK when modifying an existing link.

TODO
src/nspawn/nspawn.c

diff --git a/TODO b/TODO
index bc81a70eb17f629155ff7190ebd22444e4b2dc23..a00c13dab2f0db52015ba66202dd1ae7f53b9a1e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -24,8 +24,6 @@ External:
 
 Features:
 
-* nspawn --network-interface= doesn't work...
-
 * dbus: add new message hdr field for allowing interactive auth, write spec for it. update dbus spec to mandate that unknown flags *must* be ignored...
 
 * maybe introduce AssertXYZ= similar to ConditionXYZ= that causes a unit to fail (instead of skipping it) if some condition is not true...
index 56d9cc68c669275d5a1d06ae90be15c236932e5f..5af89c9b3238560e064d51fff46795ddb2a8e4bd 100644 (file)
@@ -1886,7 +1886,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;