X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=include%2Fnet%2Fnetlink.h;h=30021339157c604ac11e3f722d12ec19c5d63021;hb=1f758d93548fb3c6297c05a351a4ba532de6a497;hp=ce5cba19c393cf5206643300263e3971e50661d1;hpb=e823aff2d6eb43083abcc75a32ddfb167c324089;p=cascardo%2Flinux.git diff --git a/include/net/netlink.h b/include/net/netlink.h index ce5cba19c393..30021339157c 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h @@ -500,14 +500,15 @@ static inline struct nlmsghdr *nlmsg_put_answer(struct sk_buff *skb, /** * nlmsg_new - Allocate a new netlink message - * @size: maximum size of message + * @payload: size of the message payload * @flags: the type of memory to allocate. * - * Use NLMSG_GOODSIZE if size isn't know and you need a good default size. + * Use NLMSG_DEFAULT_SIZE if the size of the payload isn't known + * and a good default is needed. */ -static inline struct sk_buff *nlmsg_new(int size, gfp_t flags) +static inline struct sk_buff *nlmsg_new(size_t payload, gfp_t flags) { - return alloc_skb(size, flags); + return alloc_skb(nlmsg_total_size(payload), flags); } /**