Message ID | 20200302090911.1442823-1-matthieu.baerts@tessares.net |
---|---|
State | Accepted, archived |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | [1/2] mptcp: fix compilation error without IPv6 | expand |
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 663e963995e1..68e0023422d6 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -804,12 +804,15 @@ static void mptcp_info2sockaddr(const struct mptcp_addr_info *info, in_addr->sin_addr = info->addr; in_addr->sin_port = info->port; - } else if (addr->ss_family == AF_INET6) { + } +#if IS_ENABLED(CONFIG_MPTCP_IPV6) + else if (addr->ss_family == AF_INET6) { struct sockaddr_in6 *in6_addr = (struct sockaddr_in6 *)addr; in6_addr->sin6_addr = info->addr6; in6_addr->sin6_port = info->port; } +#endif } int __mptcp_subflow_connect(struct sock *sk, int ifindex,
net/mptcp/subflow.c: In function ‘mptcp_info2sockaddr’: net/mptcp/subflow.c:810:31: error: ‘const struct mptcp_addr_info’ has no member named ‘addr6’; did you mean ‘addr’? 810 | in6_addr->sin6_addr = info->addr6; | ^~~~~ | addr Fixes: f88ff34735b9 (Squash-to: "mptcp: Add handling of outgoing MP_JOIN requests") Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> --- Notes: to be squashed in "mptcp: Add handling of outgoing MP_JOIN requests" net/mptcp/subflow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)