diff --git a/net/socket/Kconfig b/net/socket/Kconfig
index ada47c6de8..6cfd9f6a95 100644
--- a/net/socket/Kconfig
+++ b/net/socket/Kconfig
@@ -66,7 +66,7 @@ config NET_SOLINGER
 	bool "SO_LINGER socket option"
 	default n
 	depends on NET_TCP_WRITE_BUFFERS || NET_UDP_WRITE_BUFFERS
-	select NET_UDP_NOTIFIER if NET_UDP
+	select NET_UDP_NOTIFIER if NET_UDP && !NET_UDP_NO_STACK
 	---help---
 		Enable or disable support for the SO_LINGER socket option.  Requires
 		write buffer support.