diff options
author | David S. Miller <davem@davemloft.net> | 2010-10-09 00:51:11 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-09 00:51:11 +0400 |
commit | 9cf8d1a3b8cb19fa49494c1b8f0f9e3a37f2c218 (patch) | |
tree | 0e9262488832ad27f6ba42680bf104872fa3c697 /net/netlink | |
parent | 8391d07b80e8da957cd888870e23f8e218438622 (diff) | |
parent | e9a68707d736f4f73d7e209885d7b4c5c452b1dc (diff) | |
download | linux-9cf8d1a3b8cb19fa49494c1b8f0f9e3a37f2c218.tar.xz |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/genetlink.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index 26ed3e8587c2..1781d99145e2 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -547,8 +547,20 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) info.userhdr = nlmsg_data(nlh) + GENL_HDRLEN; info.attrs = family->attrbuf; genl_info_net_set(&info, net); + memset(&info.user_ptr, 0, sizeof(info.user_ptr)); - return ops->doit(skb, &info); + if (family->pre_doit) { + err = family->pre_doit(ops, skb, &info); + if (err) + return err; + } + + err = ops->doit(skb, &info); + + if (family->post_doit) + family->post_doit(ops, skb, &info); + + return err; } static void genl_rcv(struct sk_buff *skb) |