Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netlink: Move netlink attribute parsing support to lib

Netlink attribute parsing may be used even if CONFIG_NET is not set.
Move it from net/netlink to lib and control its inclusion based on the new
config symbol CONFIG_NLATTR, which is selected by CONFIG_NET.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Geert Uytterhoeven and committed by
Herbert Xu
e9cc8bdd 8c882f64

+10 -1
+6
lib/Kconfig
··· 174 174 bool "Disable obsolete cpumask functions" if DEBUG_PER_CPU_MAPS 175 175 depends on EXPERIMENTAL && BROKEN 176 176 177 + # 178 + # Netlink attribute parsing support is select'ed if needed 179 + # 180 + config NLATTR 181 + bool 182 + 177 183 endmenu
+2
lib/Makefile
··· 84 84 85 85 obj-$(CONFIG_DYNAMIC_PRINTK_DEBUG) += dynamic_printk.o 86 86 87 + obj-$(CONFIG_NLATTR) += nlattr.o 88 + 87 89 hostprogs-y := gen_crc32table 88 90 clean-files := crc32table.h 89 91
+1
net/Kconfig
··· 4 4 5 5 menuconfig NET 6 6 bool "Networking support" 7 + select NLATTR 7 8 ---help--- 8 9 Unless you really know what you are doing, you should say Y here. 9 10 The reason is that some programs need kernel networking support even
+1 -1
net/netlink/Makefile
··· 2 2 # Makefile for the netlink driver. 3 3 # 4 4 5 - obj-y := af_netlink.o attr.o genetlink.o 5 + obj-y := af_netlink.o genetlink.o
net/netlink/attr.c lib/nlattr.c