aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/tipc.h1
-rw-r--r--net/tipc/netlink.c4
2 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/tipc.h b/include/linux/tipc.h
index ca754f3317f2..1faab77626f2 100644
--- a/include/linux/tipc.h
+++ b/include/linux/tipc.h
@@ -539,7 +539,6 @@ static inline void TLV_LIST_STEP(struct tlv_list_desc *list)
539 * Configuration messages exchanged via NETLINK_GENERIC use the following 539 * Configuration messages exchanged via NETLINK_GENERIC use the following
540 * family id, name, version and command. 540 * family id, name, version and command.
541 */ 541 */
542#define TIPC_GENL_FAMILY 0x222
543#define TIPC_GENL_NAME "TIPC" 542#define TIPC_GENL_NAME "TIPC"
544#define TIPC_GENL_VERSION 0x1 543#define TIPC_GENL_VERSION 0x1
545#define TIPC_GENL_CMD 0x1 544#define TIPC_GENL_CMD 0x1
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c
index 35fbc7933604..08b974ed9109 100644
--- a/net/tipc/netlink.c
+++ b/net/tipc/netlink.c
@@ -40,7 +40,7 @@ static int handle_cmd(struct sk_buff *skb, struct genl_info *info)
40 struct nlmsghdr *rep_nlh; 40 struct nlmsghdr *rep_nlh;
41 struct nlmsghdr *req_nlh = info->nlhdr; 41 struct nlmsghdr *req_nlh = info->nlhdr;
42 struct tipc_genlmsghdr *req_userhdr = info->userhdr; 42 struct tipc_genlmsghdr *req_userhdr = info->userhdr;
43 int hdr_space = NLMSG_SPACE(0); 43 int hdr_space = NLMSG_SPACE(GENL_HDRLEN + TIPC_GENL_HDRLEN);
44 44
45 if ((req_userhdr->cmd & 0xC000) && (!capable(CAP_NET_ADMIN))) 45 if ((req_userhdr->cmd & 0xC000) && (!capable(CAP_NET_ADMIN)))
46 rep_buf = cfg_reply_error_string(TIPC_CFG_NOT_NET_ADMIN); 46 rep_buf = cfg_reply_error_string(TIPC_CFG_NOT_NET_ADMIN);
@@ -63,7 +63,7 @@ static int handle_cmd(struct sk_buff *skb, struct genl_info *info)
63} 63}
64 64
65static struct genl_family family = { 65static struct genl_family family = {
66 .id = TIPC_GENL_FAMILY, 66 .id = GENL_ID_GENERATE,
67 .name = TIPC_GENL_NAME, 67 .name = TIPC_GENL_NAME,
68 .version = TIPC_GENL_VERSION, 68 .version = TIPC_GENL_VERSION,
69 .hdrsize = TIPC_GENL_HDRLEN, 69 .hdrsize = TIPC_GENL_HDRLEN,