aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/lxc/confile.c')
-rw-r--r--src/lxc/confile.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lxc/confile.c b/src/lxc/confile.c
index 39a8e2c..3a9a86d 100644
--- a/src/lxc/confile.c
+++ b/src/lxc/confile.c
@@ -49,6 +49,7 @@ static int config_network_type(const char *, char *, struct lxc_conf *);
static int config_network_flags(const char *, char *, struct lxc_conf *);
static int config_network_link(const char *, char *, struct lxc_conf *);
static int config_network_name(const char *, char *, struct lxc_conf *);
+static int config_network_pair(const char *, char *, struct lxc_conf *);
static int config_network_hwaddr(const char *, char *, struct lxc_conf *);
static int config_network_mtu(const char *, char *, struct lxc_conf *);
static int config_network_ipv4(const char *, char *, struct lxc_conf *);
@@ -73,6 +74,7 @@ static struct config config[] = {
{ "lxc.network.flags", config_network_flags },
{ "lxc.network.link", config_network_link },
{ "lxc.network.name", config_network_name },
+ { "lxc.network.pair", config_network_pair },
{ "lxc.network.hwaddr", config_network_hwaddr },
{ "lxc.network.mtu", config_network_mtu },
{ "lxc.network.ipv4", config_network_ipv4 },
@@ -221,6 +223,18 @@ static int config_network_name(const char *key, char *value,
return network_ifname(&netdev->name, value);
}
+static int config_network_pair(const char *key, char *value,
+ struct lxc_conf *lxc_conf)
+{
+ struct lxc_netdev *netdev;
+
+ netdev = network_netdev(key, value, &lxc_conf->network);
+ if (!netdev)
+ return -1;
+
+ return network_ifname(&netdev->pair, value);
+}
+
static int config_network_hwaddr(const char *key, char *value,
struct lxc_conf *lxc_conf)
{