From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Maloy Subject: [iproute2 1/1] tipc: change family attribute from u32 to u16 Date: Wed, 15 Nov 2017 17:25:44 +0100 Message-ID: <1510763144-24668-1-git-send-email-jon.maloy@ericsson.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , , , , , To: , Return-path: Received: from sesbmg22.ericsson.net ([193.180.251.48]:42339 "EHLO sesbmg22.ericsson.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932381AbdKOQZw (ORCPT ); Wed, 15 Nov 2017 11:25:52 -0500 Sender: netdev-owner@vger.kernel.org List-ID: commit 28033ae4e0f ("net: netlink: Update attr validation to require exact length for some types") introduces a stricter control on attributes of type NLA_U* and NLA_S*. Since the tipc tool is sending a family attribute of u32 instead of as expected u16 the tool is now effectively broken. We fix this by changing the type of the said attribute. Signed-off-by: Jon Maloy --- tipc/msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tipc/msg.c b/tipc/msg.c index 22c2222..dc09d05 100644 --- a/tipc/msg.c +++ b/tipc/msg.c @@ -125,7 +125,7 @@ static int get_family(void) genl->cmd = CTRL_CMD_GETFAMILY; genl->version = 1; - mnl_attr_put_u32(nlh, CTRL_ATTR_FAMILY_ID, GENL_ID_CTRL); + mnl_attr_put_u16(nlh, CTRL_ATTR_FAMILY_ID, GENL_ID_CTRL); mnl_attr_put_strz(nlh, CTRL_ATTR_FAMILY_NAME, TIPC_GENL_V2_NAME); if ((err = msg_query(nlh, family_id_cb, &nl_family))) -- 2.1.4