901-debloat_sock_diag.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --- a/net/Kconfig
  2. +++ b/net/Kconfig
  3. @@ -87,6 +87,9 @@ source "net/netlabel/Kconfig"
  4. endif # if INET
  5. +config SOCK_DIAG
  6. + bool
  7. +
  8. config NETWORK_SECMARK
  9. bool "Security Marking"
  10. help
  11. --- a/net/core/Makefile
  12. +++ b/net/core/Makefile
  13. @@ -8,9 +8,9 @@ obj-y := sock.o request_sock.o skbuff.o
  14. obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
  15. obj-y += dev.o ethtool.o dev_addr_lists.o dst.o netevent.o \
  16. - neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
  17. - sock_diag.o
  18. + neighbour.o rtnetlink.o utils.o link_watch.o filter.o
  19. +obj-$(CONFIG_SOCK_DIAG) += sock_diag.o
  20. obj-$(CONFIG_XFRM) += flow.o
  21. obj-y += net-sysfs.o
  22. obj-$(CONFIG_NET_PKTGEN) += pktgen.o
  23. --- a/net/ipv4/Kconfig
  24. +++ b/net/ipv4/Kconfig
  25. @@ -404,6 +404,7 @@ config INET_LRO
  26. config INET_DIAG
  27. tristate "INET: socket monitoring interface"
  28. + select SOCK_DIAG
  29. default y
  30. ---help---
  31. Support for INET (TCP, DCCP, etc) socket monitoring interface used by
  32. --- a/net/unix/Kconfig
  33. +++ b/net/unix/Kconfig
  34. @@ -22,6 +22,7 @@ config UNIX
  35. config UNIX_DIAG
  36. tristate "UNIX: socket monitoring interface"
  37. depends on UNIX
  38. + select SOCK_DIAG
  39. default n
  40. ---help---
  41. Support for UNIX socket monitoring interface used by the ss tool.