static char **arg_network_interfaces = NULL;
static bool arg_network_veth = false;
static char *arg_network_bridge = NULL;
static char **arg_network_interfaces = NULL;
static bool arg_network_veth = false;
static char *arg_network_bridge = NULL;
{ "network-interface", required_argument, NULL, ARG_NETWORK_INTERFACE },
{ "network-veth", no_argument, NULL, ARG_NETWORK_VETH },
{ "network-bridge", required_argument, NULL, ARG_NETWORK_BRIDGE },
{ "network-interface", required_argument, NULL, ARG_NETWORK_INTERFACE },
{ "network-veth", no_argument, NULL, ARG_NETWORK_VETH },
{ "network-bridge", required_argument, NULL, ARG_NETWORK_BRIDGE },
static int setup_boot_id(const char *dest) {
_cleanup_free_ char *from = NULL, *to = NULL;
static int setup_boot_id(const char *dest) {
_cleanup_free_ char *from = NULL, *to = NULL;
+ /* Use two different interface name prefixes depending whether
+ * we are in bridge mode or not. */
+ if (arg_network_bridge)
+ memcpy(iface_name, "vb-", 3);
+ else
+ memcpy(iface_name, "ve-", 3);
+
- r = sd_rtnl_message_new_link(RTM_NEWLINK, 0, &m);
+ r = sd_rtnl_message_new_link(rtnl, &m, RTM_NEWLINK, 0);
- r = sd_rtnl_message_new_link(RTM_SETLINK, 0, &m);
+ r = sd_rtnl_message_new_link(rtnl, &m, RTM_SETLINK, 0);
- r = sd_rtnl_message_new_link(RTM_NEWLINK, ifi, &m);
+ r = sd_rtnl_message_new_link(rtnl, &m, RTM_NEWLINK, ifi);
- r = seccomp_rule_add_exact(
+ r = seccomp_add_secondary_archs(seccomp);
+ if (r < 0 && r != -EEXIST) {
+ log_error("Failed to add secondary archs to seccomp filter: %s", strerror(-r));
+ goto finish;
+ }
+
+ r = seccomp_rule_add(
eventfd_read(sync_fd, &x);
close_nointr_nofail(sync_fd);
sync_fd = -1;
eventfd_read(sync_fd, &x);
close_nointr_nofail(sync_fd);
sync_fd = -1;