mptcp:fullmesh: fix compilation warning if no IPv6
Subsystems (2)
Christoph Paasch
PATCH 1/1 mptcp:fullmesh: fix compilation warning if no IPv6
From: Matthieu Baerts <matthieu.baerts(a)tessares.net>
if_idx would be seen as an unitialized variable even if it should never happen in case of !CONFIG_IPV6. But let makes the compiler happy!
Fixes 9e763119cccc6 (mptcp: Check interface index in fullmesh pm)
Signed-off-by Matthieu Baerts <matthieu.baerts(a)tessares.net>
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
(cherry picked from commit e2b2f250f15fe9c4442483c1263af83cf8d8a0d5)
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
--- net/mptcp/mptcp_fullmesh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/mptcp/mptcp_fullmesh.c +2 -2
@@ -1301,9 +1301,9 @@ static void full_mesh_new_session(const struct sock *meta_sk)struct fullmesh_priv *fmp =fullmesh_get_priv (mpcb);const struct mptcp_fm_ns *fm_ns =fm_get_ns (sock_net (meta_sk));struct tcp_sock *master_tp =tcp_sk (mpcb->master_sk); -int i, index, if_idx; +int i, index, if_idx =0 ;union inet_addr saddr, daddr; -sa_family_t family; +sa_family_t family =AF_INET ;bool meta_v4 = meta_sk->sk_family ==AF_INET ;/* Init local variables necessary for the rest */
Signature · 1 line
2.16.2
Mat Martineau
Quoted 10 lines · Christoph Paasch
From: Matthieu Baerts <matthieu.baerts(a)tessares.net>
if_idxwould be seen as an unitialized variable even if it should never happen in case of !CONFIG_IPV6. But let makes the compiler happy!Fixes 9e763119cccc6 (mptcp: Check interface index in fullmesh pm)Signed-off-by Matthieu Baerts <matthieu.baerts(a)tessares.net>Signed-off-by Christoph Paasch <cpaasch(a)apple.com>(cherry picked from commit e2b2f250f15fe9c4442483c1263af83cf8d8a0d5)Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
Thanks Christoph and Matthieu. Patch applied.
--
Mat Martineau
Intel OTC