diff options
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 9a9ed9dc6e..84724d59c9 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1486,13 +1486,7 @@ static int setup_veth(pid_t pid, char iface_name[IFNAMSIZ]) { return r; } - r = sd_rtnl_message_append_string(m, IFLA_INFO_KIND, "veth"); - if (r < 0) { - log_error("Failed to append netlink kind: %s", strerror(-r)); - return r; - } - - r = sd_rtnl_message_open_container(m, IFLA_INFO_DATA); + r = sd_rtnl_message_open_container_union(m, IFLA_INFO_DATA, "veth"); if (r < 0) { log_error("Failed to open netlink container: %s", strerror(-r)); return r; @@ -1757,13 +1751,7 @@ static int setup_macvlan(pid_t pid) { return r; } - r = sd_rtnl_message_append_string(m, IFLA_INFO_KIND, "macvlan"); - if (r < 0) { - log_error("Failed to append netlink kind: %s", strerror(-r)); - return r; - } - - r = sd_rtnl_message_open_container(m, IFLA_INFO_DATA); + r = sd_rtnl_message_open_container_union(m, IFLA_INFO_DATA, "macvlan"); if (r < 0) { log_error("Failed to open netlink container: %s", strerror(-r)); return r; |