mptcp: fix compilation error without IPV6
Subsystems (2)
Matthieu Baerts
PATCH 1/2 mptcp: fix compilation error without IPV6
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---
Notes:
to be squashed in "mptcp: Add path manager interface"
net/mptcp/options.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/mptcp/options.c +3 -1
@@ -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,
Signature · 1 line
2.25.1
Matthieu Baerts
PATCH 2/2 mptcp: fix compilation warning without IPV6
net/mptcp/options.c:553:12: warning: ‘add_addr6_generate_hmac’ defined but not used [-Wunused-function]
553 | static u64 add_addr6_generate_hmac(u64 key1, u64 key2, u8 addr_id,
| ^~~~~~~~~~~~~~~~~~~~~~~---
Notes:
to be squashed in "mptcp: Add ADD_ADDR handling"
net/mptcp/options.c | 2 ++ 1 file changed, 2 insertions(+)
net/mptcp/options.c +2 -0
@@ -550,6 +550,7 @@ static u64 add_addr_generate_hmac(u64 key1, u64 key2, u8 addr_id,return get_unaligned_be64 (hmac); } +#if IS_ENABLED (CONFIG_MPTCP_IPV6 )static u64 add_addr6_generate_hmac (u64 key1,u64 key2,u8 addr_id,struct in6_addr *addr) {
@@ -565,6 +566,7 @@ static u64 add_addr6_generate_hmac(u64 key1, u64 key2, u8 addr_id,return get_unaligned_be64 (hmac); } +#endif static bool mptcp_established_options_addr(struct sock *sk, unsigned int *size,
Signature · 1 line
2.25.1
Paolo Abeni
Hi,
Quoted 47 lines · Matthieu Baerts
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); | ^~~~~ | addrFixes 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(-)net/mptcp/options.c +3
-1@@ -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,Signature · 4 lines
2.25.1 _______________________________________________ mptcp mailing list -- mptcp(a)lists.01.org To unsubscribe send an email to mptcp-leave(a)lists.01.org
Both patches LGTM, thanks!
Paolo
Matthieu Baerts
Hi Paolo,
Quoted 11 lines · Paolo Abeni
Hi,
Quoted 8 lines · Matthieu Baerts
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); | ^~~~~ | addrFixes 8536089ea875 (mptcp: v1 ADD_ADDR changes: add_addr_hmac_valid)Signed-off-by Matthieu Baerts <matthieu.baerts(a)tessares.net>
(...)
Quoted 1 line
Both patches LGTM, thanks!
Thank you for the review!
- cc2ee05dc8b7: "squashed" patch 2/2 in "mptcp: Add ADD_ADDR handling"
- 9bd3412b5201: "squashed" in "mptcp: Add path manager interface"
- 643e943f5de4..ca158067259a: result
Tests + export will be launched soon.
Cheers,
Matt
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium