X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Ftipc%2Fnetlink.c;h=6a7f7b4c2595b365ff5f3b015b23e553080baa8e;hb=4f02f8220562591322c118d07a32bebf705318b7;hp=eb1bb4dce7af950f43bbf6c5899f649ea170e986;hpb=28e0cf22c1221650b4bfba48808d966160c42320;p=linux-2.6 diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c index eb1bb4dce7..6a7f7b4c25 100644 --- a/net/tipc/netlink.c +++ b/net/tipc/netlink.c @@ -1,6 +1,6 @@ /* * net/tipc/netlink.c: TIPC configuration handling - * + * * Copyright (c) 2005-2006, Ericsson AB * Copyright (c) 2005, Wind River Systems * All rights reserved. @@ -57,21 +57,21 @@ static int handle_cmd(struct sk_buff *skb, struct genl_info *info) if (rep_buf) { skb_push(rep_buf, hdr_space); - rep_nlh = (struct nlmsghdr *)rep_buf->data; + rep_nlh = nlmsg_hdr(rep_buf); memcpy(rep_nlh, req_nlh, hdr_space); rep_nlh->nlmsg_len = rep_buf->len; - genlmsg_unicast(rep_buf, req_nlh->nlmsg_pid); + genlmsg_unicast(rep_buf, NETLINK_CB(skb).pid); } - return 0; + return 0; } static struct genl_family family = { - .id = GENL_ID_GENERATE, - .name = TIPC_GENL_NAME, - .version = TIPC_GENL_VERSION, - .hdrsize = TIPC_GENL_HDRLEN, - .maxattr = 0, + .id = GENL_ID_GENERATE, + .name = TIPC_GENL_NAME, + .version = TIPC_GENL_VERSION, + .hdrsize = TIPC_GENL_HDRLEN, + .maxattr = 0, }; static struct genl_ops ops = { @@ -93,7 +93,7 @@ int tipc_netlink_start(void) if (genl_register_ops(&family, &ops)) goto err_unregister; - return 0; + return 0; err_unregister: genl_unregister_family(&family);