diff options
author | Per Liden <per.liden@nospam.ericsson.com> | 2006-01-05 10:34:00 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-12 17:06:32 -0500 |
commit | 1dba9743337cabacea79e47ed6d709e636c5ed47 (patch) | |
tree | b5244bd1e0b798553a3ab8627b0b06ddbe52a749 /net/tipc | |
parent | b97bf3fd8f6a16966d4f18983b2c40993ff937d4 (diff) |
[TIPC] Use dynamically allocated family id with NETLINK_GENERIC
Signed-off-by: Per Liden <per.liden@nospam.ericsson.com>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/netlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c index 35fbc793360..08b974ed910 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 | ||
65 | static struct genl_family family = { | 65 | static 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, |