diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-04-26 21:46:04 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-04-26 21:46:04 +0200 |
commit | f86d9b40b170dd93debb613f48d1bf7116e19233 (patch) | |
tree | 8fa6d847c29dbda09b0c4571cf5e596bd63f1f7d | |
parent | cbcc25b2f05b06cb2a91c0b4c49bfc93a54851a0 (diff) |
Fix CTRL_ATTR_FAMILY_ID attribute size
This fixes the following kernel error message:
netlink: 'osmo-ggsn': attribute type 1 has an invalid length.
This is due to CTRL_ATTR_FAMILY_ID being defined as a 16bit netlink
attribute, but us encoding it as u32:
netlink/genetlink.c: [CTRL_ATTR_FAMILY_ID] = { .type = NLA_U16 },
let's properly encode it as 16bit and hence resolve the error message.
Change-Id: I41b2719ffc24d7a3420b5980f2a967264e606d91
Closes: OS#3216
-rw-r--r-- | src/genl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -152,7 +152,7 @@ genl_nlmsg_build_lookup(char *buf, const char *subsys_name) 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, subsys_name); return nlh; |