[lxc-devel] [lxc/master] network: Fixes bug in macvlan mode selection

tomponline on Github lxc-bot at linuxcontainers.org
Mon Apr 29 14:11:51 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 357 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190429/08b53ff3/attachment.bin>
-------------- next part --------------
From b56680fd747cb4dd378ff693b16caeda8f18097c Mon Sep 17 00:00:00 2001
From: tomponline <thomas.parrott at canonical.com>
Date: Mon, 29 Apr 2019 15:11:17 +0100
Subject: [PATCH] network: Fixes bug in macvlan mode selection

Signed-off-by: tomponline <thomas.parrott at canonical.com>
---
 src/lxc/confile_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/confile_utils.c b/src/lxc/confile_utils.c
index 50777c4481..007a030e9f 100644
--- a/src/lxc/confile_utils.c
+++ b/src/lxc/confile_utils.c
@@ -474,7 +474,7 @@ char *lxc_macvlan_flag_to_mode(int mode)
 	size_t i;
 
 	for (i = 0; i < sizeof(macvlan_mode) / sizeof(macvlan_mode[0]); i++) {
-		if (macvlan_mode[i].mode == mode)
+		if (macvlan_mode[i].mode != mode)
 			continue;
 
 		return macvlan_mode[i].name;


More information about the lxc-devel mailing list