Skip to content

Commit 65b8c8a

Browse files
geliangtangkuba-moo
authored andcommitted
mptcp: move mptcp_options_received's port initialization
Move mptcp_options_received's port initialization from mptcp_parse_option to mptcp_get_options, put it together with the other fields initializations of mptcp_options_received. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent fe2d9b1 commit 65b8c8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/mptcp/options.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ static void mptcp_parse_option(const struct sk_buff *skb,
241241
}
242242

243243
mp_opt->add_addr = 1;
244-
mp_opt->port = 0;
245244
mp_opt->addr_id = *ptr++;
246245
pr_debug("ADD_ADDR: id=%d, echo=%d", mp_opt->addr_id, mp_opt->echo);
247246
if (mp_opt->family == MPTCP_ADDR_IPVERSION_4) {
@@ -298,6 +297,7 @@ void mptcp_get_options(const struct sk_buff *skb,
298297
mp_opt->mp_join = 0;
299298
mp_opt->add_addr = 0;
300299
mp_opt->ahmac = 0;
300+
mp_opt->port = 0;
301301
mp_opt->rm_addr = 0;
302302
mp_opt->dss = 0;
303303

0 commit comments

Comments
 (0)