[lxc-devel] [lxc/master] src/lxc/network: Fixes netlink attribute type 1 has an invalid length message

tomponline on Github lxc-bot at linuxcontainers.org
Wed Apr 22 09:13:05 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 376 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200422/ea47a0f6/attachment.bin>
-------------- next part --------------
From 3a934e2e53aa697505259d9fa4c6c07dafeafa92 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Wed, 22 Apr 2020 10:11:07 +0100
Subject: [PATCH] src/lxc/network: Fixes netlink attribute type 1 has an
 invalid length message

Fixes #3386

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

diff --git a/src/lxc/network.c b/src/lxc/network.c
index 6bdcd71a5b..a825180cf7 100644
--- a/src/lxc/network.c
+++ b/src/lxc/network.c
@@ -586,7 +586,7 @@ static int lxc_ipvlan_create(const char *master, const char *name, int mode, int
 	if (!nest2)
 		return ret_errno(EPROTO);
 
-	if (nla_put_u32(nlmsg, IFLA_IPVLAN_MODE, mode))
+	if (nla_put_u16(nlmsg, IFLA_IPVLAN_MODE, mode))
 		return ret_errno(EPROTO);
 
 	/* if_link.h does not define the isolation flag value for bridge mode (unlike IPVLAN_F_PRIVATE and


More information about the lxc-devel mailing list