901-debloat_sock_diag.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --- a/net/Kconfig
  2. +++ b/net/Kconfig
  3. @@ -89,6 +89,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. @@ -9,8 +9,9 @@ obj-$(CONFIG_SYSCTL) += sysctl_net_core.
  14. obj-y += dev.o ethtool.o dev_addr_lists.o dst.o netevent.o \
  15. neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
  16. - sock_diag.o dev_ioctl.o tso.o
  17. + dev_ioctl.o tso.o
  18. +obj-$(CONFIG_SOCK_DIAG) += sock_diag.o
  19. obj-$(CONFIG_XFRM) += flow.o
  20. obj-y += net-sysfs.o
  21. obj-$(CONFIG_PROC_FS) += net-procfs.o
  22. --- a/net/ipv4/Kconfig
  23. +++ b/net/ipv4/Kconfig
  24. @@ -419,6 +419,7 @@ config INET_LRO
  25. config INET_DIAG
  26. tristate "INET: socket monitoring interface"
  27. + select SOCK_DIAG
  28. default y
  29. ---help---
  30. Support for INET (TCP, DCCP, etc) socket monitoring interface used by
  31. --- a/net/unix/Kconfig
  32. +++ b/net/unix/Kconfig
  33. @@ -22,6 +22,7 @@ config UNIX
  34. config UNIX_DIAG
  35. tristate "UNIX: socket monitoring interface"
  36. depends on UNIX
  37. + select SOCK_DIAG
  38. default n
  39. ---help---
  40. Support for UNIX socket monitoring interface used by the ss tool.