[lxc-devel] [lxc/master] src/lxc/network: ipvlan comment and code style tweak

tomponline on Github lxc-bot at linuxcontainers.org
Thu Apr 9 10:36:16 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200409/e82c6df4/attachment.bin>
-------------- next part --------------
From cf88a8279b53e63ab9638175e1fbe8639fcd66e5 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Thu, 9 Apr 2020 11:35:48 +0100
Subject: [PATCH] src/lxc/network: ipvlan comment and code style tweak

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 src/lxc/network.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lxc/network.c b/src/lxc/network.c
index ef45e98ab5..2a4a476509 100644
--- a/src/lxc/network.c
+++ b/src/lxc/network.c
@@ -589,11 +589,11 @@ static int lxc_ipvlan_create(const char *master, const char *name, int mode, int
 	if (nla_put_u32(nlmsg, IFLA_IPVLAN_MODE, mode))
 		return ret_errno(EPROTO);
 
-	/* if_link.h does not define the isolation flag value for bridge mode so we define it as 0
-	 * and only send mode if mode >0 as default mode is bridge anyway according to ipvlan docs.
+	/* if_link.h does not define the isolation flag value for bridge mode (unlike IPVLAN_F_PRIVATE and
+	 * IPVLAN_F_VEPA) so we define it as 0 and only send mode if mode >0 as default mode is bridge anyway
+	 * according to ipvlan docs.
 	 */
-	if (isolation > 0 &&
-	    nla_put_u16(nlmsg, IFLA_IPVLAN_ISOLATION, isolation))
+	if (isolation > 0 && nla_put_u16(nlmsg, IFLA_IPVLAN_ISOLATION, isolation))
 		return ret_errno(EPROTO);
 
 	nla_end_nested(nlmsg, nest2);


More information about the lxc-devel mailing list