]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
src/lxc/network: ipvlan comment and code style tweak 3367/head
authorThomas Parrott <thomas.parrott@canonical.com>
Thu, 9 Apr 2020 10:35:48 +0000 (11:35 +0100)
committerThomas Parrott <thomas.parrott@canonical.com>
Thu, 9 Apr 2020 10:35:48 +0000 (11:35 +0100)
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
src/lxc/network.c

index ef45e98ab54acbe61dbfc259dd9fc370f7bc8a13..2a4a476509bcb112f984b22363a59a342b829723 100644 (file)
@@ -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);