mptcp: Fix incorrect IPV6 dependency check
diff mbox series

Message ID 20200129180117.545-1-geert@linux-m68k.org
State Accepted
Commit 8e1974a2a02bf5b77831c686f01761163ea0cd3e
Headers show
Series
  • mptcp: Fix incorrect IPV6 dependency check
Related show

Commit Message

Geert Uytterhoeven Jan. 29, 2020, 6:01 p.m. UTC
If CONFIG_MPTCP=y, CONFIG_MPTCP_IPV6=n, and CONFIG_IPV6=m:

    net/mptcp/protocol.o: In function `__mptcp_tcp_fallback':
    protocol.c:(.text+0x786): undefined reference to `inet6_stream_ops'

Fix this by checking for CONFIG_MPTCP_IPV6 instead of CONFIG_IPV6, like
is done in all other places in the mptcp code.

Fixes: 8ab183deb26a3b79 ("mptcp: cope with later TCP fallback")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 net/mptcp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mat Martineau Jan. 29, 2020, 9:10 p.m. UTC | #1
On Wed, 29 Jan 2020, Geert Uytterhoeven wrote:

> If CONFIG_MPTCP=y, CONFIG_MPTCP_IPV6=n, and CONFIG_IPV6=m:
>
>    net/mptcp/protocol.o: In function `__mptcp_tcp_fallback':
>    protocol.c:(.text+0x786): undefined reference to `inet6_stream_ops'
>
> Fix this by checking for CONFIG_MPTCP_IPV6 instead of CONFIG_IPV6, like
> is done in all other places in the mptcp code.
>
> Fixes: 8ab183deb26a3b79 ("mptcp: cope with later TCP fallback")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>


--
Mat Martineau
Intel
David Miller Jan. 30, 2020, 8:56 a.m. UTC | #2
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Wed, 29 Jan 2020 19:01:17 +0100

> If CONFIG_MPTCP=y, CONFIG_MPTCP_IPV6=n, and CONFIG_IPV6=m:
> 
>     net/mptcp/protocol.o: In function `__mptcp_tcp_fallback':
>     protocol.c:(.text+0x786): undefined reference to `inet6_stream_ops'
> 
> Fix this by checking for CONFIG_MPTCP_IPV6 instead of CONFIG_IPV6, like
> is done in all other places in the mptcp code.
> 
> Fixes: 8ab183deb26a3b79 ("mptcp: cope with later TCP fallback")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Applied.

Patch
diff mbox series

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 39fdca79ce90137e..096dfd1074540c8a 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -28,7 +28,7 @@  static void __mptcp_close(struct sock *sk, long timeout);
 
 static const struct proto_ops *tcp_proto_ops(struct sock *sk)
 {
-#if IS_ENABLED(CONFIG_IPV6)
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
 	if (sk->sk_family == AF_INET6)
 		return &inet6_stream_ops;
 #endif