Skip to content

Commit

Permalink
netlink: Move netlink attribute parsing support to lib
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven authored and Herbert Xu committed Mar 4, 2009
1 parent 8c882f6 commit e9cc8bd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,10 @@ config DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
bool "Disable obsolete cpumask functions" if DEBUG_PER_CPU_MAPS
depends on EXPERIMENTAL && BROKEN

#
# Netlink attribute parsing support is select'ed if needed
#
config NLATTR
bool

endmenu
2 changes: 2 additions & 0 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ obj-$(CONFIG_HAVE_ARCH_TRACEHOOK) += syscall.o

obj-$(CONFIG_DYNAMIC_PRINTK_DEBUG) += dynamic_printk.o

obj-$(CONFIG_NLATTR) += nlattr.o

hostprogs-y := gen_crc32table
clean-files := crc32table.h

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

menuconfig NET
bool "Networking support"
select NLATTR
---help---
Unless you really know what you are doing, you should say Y here.
The reason is that some programs need kernel networking support even
Expand Down
2 changes: 1 addition & 1 deletion net/netlink/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Makefile for the netlink driver.
#

obj-y := af_netlink.o attr.o genetlink.o
obj-y := af_netlink.o genetlink.o

0 comments on commit e9cc8bd

Please sign in to comment.