From: Luis R. Rodriguez Date: Fri, 29 Jun 2012 20:40:15 +0000 (-0700) Subject: compat: backport definition of NLMSG_DEFAULT_SIZE X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=16bb4451eef7a9dcf238a9d16ca2483997863d10;p=openwrt%2Fstaging%2Fblogic.git compat: backport definition of NLMSG_DEFAULT_SIZE This backports the definition of NLMSG_DEFAULT_SIZE defined in this commit: commit 58050fce3530939372e6c2f4b4beb76fcb4caa65 Author: Thomas Graf Date: Thu Jun 28 03:57:45 2012 +0000 net: Use NLMSG_DEFAULT_SIZE in combination with nlmsg_new() Using NLMSG_GOODSIZE results in multiple pages being used as nlmsg_new() will automatically add the size of the netlink header to the payload thus exceeding the page limit. NLMSG_DEFAULT_SIZE takes this into account. Signed-off-by: Thomas Graf Cc: Jiri Pirko Cc: Dmitry Eremin-Solenikov Cc: Sergey Lapin Cc: Johannes Berg Cc: Lauro Ramos Venancio Cc: Aloisio Almeida Jr Cc: Samuel Ortiz Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller Signed-off-by: Luis R. Rodriguez --- diff --git a/include/linux/compat-3.6.h b/include/linux/compat-3.6.h index 8cdfa8774918..9da8ec500919 100644 --- a/include/linux/compat-3.6.h +++ b/include/linux/compat-3.6.h @@ -5,6 +5,10 @@ #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)) +#include + +#define GENLMSG_DEFAULT_SIZE (NLMSG_DEFAULT_SIZE - GENL_HDRLEN) + /* * Backports *