diff mbox series

rxrpc: add IPV6 dependency

Message ID 20181012123624.2001922-1-arnd@arndb.de
State New
Headers show
Series rxrpc: add IPV6 dependency | expand

Commit Message

Arnd Bergmann Oct. 12, 2018, 12:36 p.m. UTC
The udpv6_encap_enable() function is part of the ipv6 code, and if that
is configured as a loadable module, rxcpc cannot be built-in any more:

net/rxrpc/local_object.o: In function `rxrpc_lookup_local':
local_object.c:(.text+0x2688): undefined reference to `udpv6_encap_enable'

Add a dependency that allows building rxrpc with or without IPv6, but
that disallows the broken configuration. Since AFS selects RXRPC,
this needs the same dependency.

Fixes: 5271953cad31 ("rxrpc: Use the UDP encap_rcv hook")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 fs/afs/Kconfig    | 1 +
 net/rxrpc/Kconfig | 1 +
 2 files changed, 2 insertions(+)

-- 
2.18.0

Comments

David Howells Oct. 12, 2018, 2:25 p.m. UTC | #1
Arnd Bergmann <arnd@arndb.de> wrote:

> +	depends on IPV6 || !IPV6


That looks weird.  It looks like it always ought to be true.

David
Randy Dunlap Oct. 12, 2018, 3:33 p.m. UTC | #2
On 10/12/18 7:25 AM, David Howells wrote:
> Arnd Bergmann <arnd@arndb.de> wrote:

> 

>> +	depends on IPV6 || !IPV6

> 

> That looks weird.  It looks like it always ought to be true.


It's a common idiom in Kconfig.

It prevents AF_RXRPC=y and IPV6=m, resulting in this build error.

-- 
~Randy
diff mbox series

Patch

diff --git a/fs/afs/Kconfig b/fs/afs/Kconfig
index ebba3b18e5da..e2cad2c9d9d8 100644
--- a/fs/afs/Kconfig
+++ b/fs/afs/Kconfig
@@ -1,6 +1,7 @@ 
 config AFS_FS
 	tristate "Andrew File System support (AFS)"
 	depends on INET
+	depends on IPV6 || !IPV6
 	select AF_RXRPC
 	select DNS_RESOLVER
 	help
diff --git a/net/rxrpc/Kconfig b/net/rxrpc/Kconfig
index 86f8853a038c..d925be00fc74 100644
--- a/net/rxrpc/Kconfig
+++ b/net/rxrpc/Kconfig
@@ -5,6 +5,7 @@ 
 config AF_RXRPC
 	tristate "RxRPC session sockets"
 	depends on INET
+	depends on IPV6 || !IPV6
 	select CRYPTO
 	select KEYS
 	help