LINBIT / drbd-utils

DRBD userspace utilities (for 9.x, 8.4, 8.3)
GNU General Public License v2.0
78 stars 46 forks source link

netlink: Add NLA_F_NESTED flag to nested attribute #4

Closed realhezhe closed 5 years ago

realhezhe commented 5 years ago

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:

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.he@windriver.com

rck commented 5 years ago

This alone would potentially break all old(er) kernels that don't have that flag. I made a prepare commit and rebased yours.

Thanks, rck