All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [PATCH 1/2] mptcp: fix compilation error without IPv6
@ 2020-03-02  9:09 Matthieu Baerts
  0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Baerts @ 2020-03-02  9:09 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

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(a)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(-)

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,
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [MPTCP] [PATCH 1/2] mptcp: fix compilation error without IPV6
@ 2020-03-19  9:05 Matthieu Baerts
  0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Baerts @ 2020-03-19  9:05 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1604 bytes --]

  net/mptcp/options.c: In function ‘add_addr_hmac_valid’:
  net/mptcp/options.c:796:39: error: ‘struct mptcp_options_received’ has no member named ‘addr6’; did you mean ‘addr’?
    796 |             mp_opt->addr_id, &mp_opt->addr6);
        |                                       ^~~~~
        |                                       addr

Fixes: 8536089ea875 (mptcp: v1 ADD_ADDR changes: add_addr_hmac_valid)
Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---

Notes:
    to be squashed in "mptcp: Add path manager interface"

 net/mptcp/options.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 1f64619be5c0..919f727cc7de 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -781,7 +781,7 @@ static void update_una(struct mptcp_sock *msk,
 static bool add_addr_hmac_valid(struct mptcp_subflow_context *subflow,
 				struct mptcp_options_received *mp_opt)
 {
-	u64 hmac;
+	u64 hmac = 0;
 
 	if (mp_opt->echo)
 		return true;
@@ -790,10 +790,12 @@ static bool add_addr_hmac_valid(struct mptcp_subflow_context *subflow,
 		hmac = add_addr_generate_hmac(subflow->remote_key,
 					      subflow->local_key,
 					      mp_opt->addr_id, &mp_opt->addr);
+#if IS_ENABLED(CONFIG_MPTCP_IPV6)
 	else
 		hmac = add_addr6_generate_hmac(subflow->remote_key,
 					       subflow->local_key,
 					       mp_opt->addr_id, &mp_opt->addr6);
+#endif
 
 	pr_debug("subflow=%p, ahmac=%llu, mp_opt->ahmac=%llu\n",
 		 subflow, (unsigned long long)hmac,
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-19  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02  9:09 [MPTCP] [PATCH 1/2] mptcp: fix compilation error without IPv6 Matthieu Baerts
2020-03-19  9:05 [MPTCP] [PATCH 1/2] mptcp: fix compilation error without IPV6 Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.