summaryrefslogtreecommitdiffstats
path: root/tipc
diff options
context:
space:
mode:
authorJon Maloy <jon.maloy@ericsson.com>2017-11-15 17:25:44 +0100
committerStephen Hemminger <stephen@networkplumber.org>2017-11-16 15:58:48 -0800
commitaab3661bd2a17f60ec45322c5f83c40a857ff1b2 (patch)
treef3c4ce2e96e4333cb1f8c2598fa7f5e9305e5abc /tipc
parenta60742aaf45908660723d45c9bac448fc997c203 (diff)
tipc: change family attribute from u32 to u16
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 <jon.maloy@ericsson.com>
Diffstat (limited to 'tipc')
-rw-r--r--tipc/msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tipc/msg.c b/tipc/msg.c
index 22c22226..dc09d050 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)))