[PATCH] wg: correct type for CTRL_ATTR_FAMILY_ID

Jörg Thalheim joerg at thalheim.io
Tue Oct 31 09:55:25 CET 2017


Signed-off-by: Joerg Thalheim <joerg at thalheim.io>
---
 src/tools/mnlg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tools/mnlg.c b/src/tools/mnlg.c
index 9135651..5ac72e2 100644
--- a/src/tools/mnlg.c
+++ b/src/tools/mnlg.c
@@ -19,7 +19,7 @@
 struct mnlg_socket {
 	struct mnl_socket *nl;
 	char *buf;
-	uint32_t id;
+	uint16_t id;
 	uint8_t version;
 	unsigned int seq;
 	unsigned int portid;
@@ -206,7 +206,7 @@ int mnlg_socket_group_add(struct mnlg_socket *nlg, const char *group_name)
  	nlh = __mnlg_msg_prepare(nlg, CTRL_CMD_GETFAMILY,
 				 NLM_F_REQUEST | NLM_F_ACK, GENL_ID_CTRL, 1);
-	mnl_attr_put_u32(nlh, CTRL_ATTR_FAMILY_ID, nlg->id);
+	mnl_attr_put_u16(nlh, CTRL_ATTR_FAMILY_ID, nlg->id);
  	err = mnlg_socket_send(nlg, nlh);
 	if (err < 0)
-- 
2.14.3



More information about the WireGuard mailing list