I can confirm that the patch from

https://bugs.launchpad.net/ubuntu/+source/drbd-utils/+bug/1866458 

against drbd-utils 9.5.0-1 works and fixes the issue for me.

Like Denis I'm on Proxmox PVE 6 (buster based) with linux 5.4.44-2

This problem hit me too.

  Tom





Description: netlink: Add NLA_F_NESTED flag to nested attribute

The mainline kernel v5.2 commit b424e432e770
("netlink: add validation of NLA_F_NESTED flag") imposes strict validation
against nested attribute as follow.

"
Add new validation flag NL_VALIDATE_NESTED which adds three consistency
checks of NLA_F_NESTED_FLAG:

  - the flag is set on attributes with NLA_NESTED{,_ARRAY} policy
  - the flag is not set on attributes with other policies except NLA_UNSPEC
  - the flag is set on attribute passed to nla_parse_nested()
"

Sending messages with nested attribute without NLA_F_NESTED would cause failed
validation. For example,

$ drbdsetup new-resource r0
Invalid argument

This patch adds NLA_F_NESTED flag to all nested attributes.

Signed-off-by: He Zhe <zhe...@windriver.com>

Author: He Zhe <zhe...@windriver.com>
Origin: upstream, https://github.com/LINBIT/drbd-utils/commit/859151b228
Bug: https://github.com/LINBIT/drbd-utils/pull/4
Bug-Ubuntu: https://launchpad.net/bugs/1866458
Reviewed-By: Rafael David Tinoco <rafaeldtin...@ubuntu.com>
Last-Update: 2020-03-09

--- drbd-utils-8.9.10.orig/user/shared/libgenl.h
+++ drbd-utils-8.9.10/user/shared/libgenl.h
@@ -851,7 +851,7 @@ static inline struct nlattr *nla_nest_st
 {
 	struct nlattr *start = (struct nlattr *)msg->tail;
 
-	if (nla_put(msg, attrtype, 0, NULL) < 0)
+	if (nla_put(msg, attrtype | NLA_F_NESTED, 0, NULL) < 0)
 		return NULL;
 
 	return start;

Reply via email to