]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
network: log veth_attr.pair and veth_attr.veth1
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 31 Aug 2017 11:17:11 +0000 (13:17 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 4 Sep 2017 11:19:10 +0000 (13:19 +0200)
If the user specified lxc.net.[i].veth.pair attribute to request that the host
side of a veth pair be given a specific name let's log it at the trace level.
Otherwise, if the user didn't not specify lxc.net.[i].veth.pair veth_attr.veth1
will contain the name of the host side veth device.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile_utils.c

index 3e8334a0d46d27d8ebd21961a20686c2c003da81..18d8226e0629992cabe58acf864fbade9326d586 100644 (file)
@@ -260,6 +260,12 @@ void lxc_log_configured_netdevs(const struct lxc_conf *conf)
                switch (netdev->type) {
                case LXC_NET_VETH:
                        TRACE("type: veth");
+                       if (netdev->priv.veth_attr.pair)
+                               TRACE("veth pair: %s",
+                                     netdev->priv.veth_attr.pair);
+                       if (netdev->priv.veth_attr.veth1[0] != '\0')
+                               TRACE("veth1 : %s",
+                                     netdev->priv.veth_attr.veth1);
                        break;
                case LXC_NET_MACVLAN:
                        TRACE("type: macvlan");