]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
src/lxc/network: Fixes netlink attribute type 1 has an invalid length message 3392/head
authorThomas Parrott <thomas.parrott@canonical.com>
Wed, 22 Apr 2020 09:11:07 +0000 (10:11 +0100)
committerThomas Parrott <thomas.parrott@canonical.com>
Wed, 22 Apr 2020 09:12:06 +0000 (10:12 +0100)
Fixes #3386

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
src/lxc/network.c

index 6bdcd71a5b78642d8c485564f36b7490b605ffaa..a825180cf7a39a687bff97d9fcc1f9aec4a2dda6 100644 (file)
@@ -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