Skip to content

Commit

Permalink
src/lxc/network: ipvlan comment and code style tweak
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
  • Loading branch information
tomponline authored and stgraber committed Apr 9, 2020
1 parent b2722ec commit 53cffd7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lxc/network.c
Expand Up @@ -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);
Expand Down

0 comments on commit 53cffd7

Please sign in to comment.