add ADD_ADDR IPv6 support
Subsystems (3)
Geliang Tang
v3 cover add ADD_ADDR IPv6 support
v3:
- drop other MPTCP suboptions instead of OPTION_TS
v2:
- avoid adding new field to tcp_sock, add new field in mptcp_pm_data.
- drop OPTION_TS in mptcp_established_options_add_addr, not intcp_established_options.
Geliang Tang (2):
mptcp: send out dedicated ADD_ADDR packet
selftests: mptcp: add subflow and ADD_ADDR IPv6 test cases
net/mptcp/options.c | 25 ++++++++++++--- net/mptcp/pm.c | 16 ++++++++-- net/mptcp/protocol.h | 4 ++- .../testing/selftests/net/mptcp/mptcp_join.sh | 32 ++++++++++++++++++- 4 files changed, 69 insertions(+), 8 deletions(-)
Signature · 1 line
2.17.1
Geliang Tang
PATCH v3 1/2 mptcp: send out dedicated ADD_ADDR packet
When ADD_ADDR suboption includes an IPv6 address, the size is 28 octets. It will not fit when other MPTCP suboptions are included in this packet, e.g. DSS. So here we send out an ADD_ADDR dedicated packet to carry only ADD_ADDR suboption, no other MPTCP suboptions.
In mptcp_pm_add_addr_signal, we check whether this is an IPv6 ADD_ADDR, and whether there's no TCP option space in this packet now. If it is, we set the flag add_addr_nospc to true, and sent out a new pure ACK packet.
In mptcp_established_options, we check whether this is a pure ACK packet for ADD_ADDR. If it is, we put only ADD_ADDR suboption in this packet, no other MPTCP suboptions.
--- net/mptcp/options.c | 25 +++++++++++++++++++++---- net/mptcp/pm.c | 16 ++++++++++++++-- net/mptcp/protocol.h | 4 +++- 3 files changed, 38 insertions(+), 7 deletions(-)
net/mptcp/options.c +21 -4
@@ -243,7 +243,9 @@ static void mptcp_parse_option(const struct sk_buff *skb, mp_opt->add_addr =1 ; mp_opt->port =0 ; mp_opt->addr_id = *ptr++; -pr_debug ("ADD_ADDR: id=%d, echo=%d" , mp_opt->addr_id, mp_opt->echo); +pr_debug ("ADD_ADDR%s: id=%d, echo=%d" , + (mp_opt->family ==MPTCP_ADDR_IPVERSION_6 ) ?"6" :"" , + mp_opt->addr_id, mp_opt->echo);if (mp_opt->family ==MPTCP_ADDR_IPVERSION_4 ) {memcpy ((u8 *)&mp_opt->addr.s_addr, (u8 *)ptr,4 ); ptr +=4 ;
@@ -584,7 +586,7 @@ static bool mptcp_established_options_add_addr(struct sock *sk,int len;if (!mptcp_pm_should_add_signal (msk) || - !(mptcp_pm_add_addr_signal (msk, remaining, &saddr, &echo))) + !(mptcp_pm_add_addr_signal (msk, sk, remaining, &saddr, &echo)))return false; len =mptcp_add_addr_len (saddr.family);
@@ -645,6 +647,17 @@ static bool mptcp_established_options_rm_addr(struct sock *sk,return true; } +static bool mptcp_check_add_addr_nospc (struct sock *sk,struct sk_buff *skb) +{ +struct mptcp_subflow_context *subflow =mptcp_subflow_ctx (sk); +struct mptcp_sock *msk =mptcp_sk (subflow->conn); + +if (skb &&skb_is_tcp_pure_ack (skb) &&READ_ONCE (msk->pm.add_addr_nospc)) +return true; + +return false; +} +bool mptcp_established_options (struct sock *sk,struct sk_buff *skb,unsigned int *size,unsigned int remaining,struct mptcp_out_options *opts)
@@ -657,6 +670,9 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,if (unlikely (mptcp_check_fallback (sk)))return false; +if (unlikely (mptcp_check_add_addr_nospc (sk, skb))) + goto add_addr; +if (mptcp_established_options_mp (sk, skb, &opt_size, remaining, opts)) ret = true; else if (mptcp_established_options_dss(sk, skb, &opt_size, remaining,
@@ -671,6 +687,7 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb, *size += opt_size; remaining -= opt_size; +add_addr:if (mptcp_established_options_add_addr (sk, &opt_size, remaining, opts)) { *size += opt_size; remaining -= opt_size;
@@ -747,10 +764,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *sk, goto fully_established; } -/* If the first established packet does not contain MP_CAPABLE + data +/* If the first established packet does not contain MP_CAPABLE + data or ADD_ADDR * then fallback to TCP */ -if (!mp_opt->mp_capable) { +if (!mp_opt->mp_capable && !mp_opt->add_addr) { subflow->mp_capable =0 ;pr_fallback (msk);__mptcp_do_fallback (msk);
net/mptcp/pm.c +14 -2
@@ -172,7 +172,8 @@ void mptcp_pm_rm_addr_received(struct mptcp_sock *msk, u8 rm_id)/* path manager helpers */ -bool mptcp_pm_add_addr_signal (struct mptcp_sock *msk,unsigned int remaining, +bool mptcp_pm_add_addr_signal (struct mptcp_sock *msk,struct sock *ssk, +unsigned int remaining,struct mptcp_addr_info *saddr,bool *echo) {int ret = false;
@@ -183,16 +184,26 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining,if (!mptcp_pm_should_add_signal (msk)) goto out_unlock; -if (remaining <mptcp_add_addr_len (msk->pm.local.family)) +if (remaining <mptcp_add_addr_len (msk->pm.local.family)) { +if (msk->pm.local.family ==AF_INET6 ) +WRITE_ONCE (msk->pm.add_addr_nospc, true); goto out_unlock; + } *saddr = msk->pm.local; *echo =READ_ONCE (msk->pm.add_addr_echo);WRITE_ONCE (msk->pm.add_addr_signal, false); +WRITE_ONCE (msk->pm.add_addr_nospc, false); ret = true; out_unlock:spin_unlock_bh (&msk->pm.lock); + +if (READ_ONCE (msk->pm.add_addr_nospc)) { +pr_debug ("send ack for add_addr6" ); +tcp_send_ack (ssk); + } +return ret; }
@@ -237,6 +248,7 @@ void mptcp_pm_data_init(struct mptcp_sock *msk)WRITE_ONCE (msk->pm.accept_addr, false);WRITE_ONCE (msk->pm.accept_subflow, false);WRITE_ONCE (msk->pm.add_addr_echo, false); +WRITE_ONCE (msk->pm.add_addr_nospc, false); msk->pm.status =0 ;spin_lock_init (&msk->pm.lock);
net/mptcp/protocol.h +3 -1
@@ -171,6 +171,7 @@ struct mptcp_pm_data {bool accept_addr;bool accept_subflow;bool add_addr_echo; +bool add_addr_nospc;u8 add_addr_signaled;u8 add_addr_accepted;u8 local_addr_used;
@@ -472,7 +473,8 @@ static inline unsigned int mptcp_add_addr_len(int family)return TCPOLEN_MPTCP_ADD_ADDR6 ; } -bool mptcp_pm_add_addr_signal (struct mptcp_sock *msk,unsigned int remaining, +bool mptcp_pm_add_addr_signal (struct mptcp_sock *msk,struct sock *sk, +unsigned int remaining,struct mptcp_addr_info *saddr,bool *echo);bool mptcp_pm_rm_addr_signal (struct mptcp_sock *msk,unsigned int remaining,u8 *rm_id);
Signature · 1 line
2.17.1
Geliang Tang
PATCH v3 2/2 selftests: mptcp: add subflow and ADD_ADDR IPv6 test cases
In reply to Geliang TangThis patch added IPv6 support for do_transfer, and the test cases for both subflow IPv6 and ADD_ADDR IPv6.
--- .../testing/selftests/net/mptcp/mptcp_join.sh | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-)
tools/testing/selftests/net/mptcp/mptcp_join.sh +31 -1
@@ -138,6 +138,12 @@ do_ping() fi } +# $1: IP address +is_v6() +{ + [ -z "${1##*:*}" ] +} + do_transfer() { listener_ns="$1"
@@ -178,7 +184,14 @@ do_transfer() mptcp_connect="./mptcp_connect -r" fi - ip netns exec ${listener_ns} $mptcp_connect -t $timeout -l -p $port -s ${srv_proto} 0.0.0.0 < "$sin" > "$sout" & + local local_addr + if is_v6 "${connect_addr}"; then + local_addr="::" + else + local_addr="0.0.0.0" + fi + + ip netns exec ${listener_ns} $mptcp_connect -t $timeout -l -p $port -s ${srv_proto} ${local_addr} < "$sin" > "$sout" & spid=$! sleep 1
@@ -528,6 +541,23 @@ run_tests_slow $ns1 $ns2 10.0.1.1 chk_join_nr "signal address, ADD_ADDR timeout" 1 1 1 chk_add_nr 4 0 +# subflow IPv6 +reset +ip netns exec $ns1 ./pm_nl_ctl limits 0 1 +ip netns exec $ns2 ./pm_nl_ctl limits 0 1 +ip netns exec $ns2 ./pm_nl_ctl add dead:beef:3::2 flags subflow +run_tests_slow $ns1 $ns2 dead:beef:1::1 +chk_join_nr "single subflow IPv6" 1 1 1 + +# signal address IPv6 +reset +ip netns exec $ns1 ./pm_nl_ctl limits 0 1 +ip netns exec $ns1 ./pm_nl_ctl add dead:beef:2::1 flags signal +ip netns exec $ns2 ./pm_nl_ctl limits 1 1 +run_tests_slow $ns1 $ns2 dead:beef:1::1 +chk_join_nr "single address IPv6" 1 1 1 +chk_add_nr 1 1 + # single subflow, remove reset ip netns exec $ns1 ./pm_nl_ctl limits 0 1
Signature · 1 line
2.17.1
Paolo Abeni
[MPTCP] Re: [MPTCP][PATCH v3 mptcp-next 1/2] mptcp: send out dedicated ADD_ADDR packet
In reply to Geliang TangQuoted 34 lines · Geliang Tang
net/mptcp/options.c +1
-1@@ -584,7 +586,7 @@ static bool mptcp_established_options_add_addr(struct sock *sk, int len;if (!mptcp_pm_should_add_signal (msk) || - !(mptcp_pm_add_addr_signal (msk, remaining, &saddr, &echo))) + !(mptcp_pm_add_addr_signal (msk, sk, remaining, &saddr, &echo)))return false;net/mptcp/options.c +11
-0len =mptcp_add_addr_len (saddr.family);@@ -645,6 +647,17 @@ static bool mptcp_established_options_rm_addr(struct sock *sk, return true; } +static bool mptcp_check_add_addr_nospc (struct sock *sk,struct sk_buff *skb) +{ +struct mptcp_subflow_context *subflow =mptcp_subflow_ctx (sk); +struct mptcp_sock *msk =mptcp_sk (subflow->conn); + +if (skb &&skb_is_tcp_pure_ack (skb) &&READ_ONCE (msk- >pm.add_addr_nospc)) +return true; + +return false; +} +bool mptcp_established_options(struct sock *sk, struct
sk_buff*skb,
unsigned int *size, unsigned int
remaining,net/mptcp/options.c +0
-0struct mptcp_out_options *opts)
net/mptcp/options.c bool mptcp_established_options(struct sock *sk, · line 676
Quoted 7 lines
net/mptcp/options.c +3
-0@@ -657,6 +670,9 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb, if (unlikely(mptcp_check_fallback(sk))) return false; +if (unlikely (mptcp_check_add_addr_nospc (sk, skb))) + goto add_addr; +
I can't follow easily the code. Here we check the 'add_addr_nospc' field, but AFAICS, such field is initialized only later, by mptcp_pm_add_addr_signal(), called
from mptcp_established_options_add_addr().
Should we instead set 'add_addr_nospc' in mptcp_pm_announce_addr() ?
Ninor note: the 'add_addr_nospc' name is a bit confusing to me, I would use instead something alike 'add_addr_ipv6', or even better we could change the 'add_addr_signal' type from bool to char, so that we could encode the addr type there. Then here we could check for 'add_addr_signal == AF_INET6' - possibly no need for a new field.
Quoted 21 lines
(quoted diff) +0
-0if (mptcp_established_options_mp(sk, skb, &opt_size, remaining, opts))(quoted diff) +0
-0ret = true; else if (mptcp_established_options_dss(sk, skb, &opt_size,remaining,
net/mptcp/options.c +1
-0@@ -671,6 +687,7 @@ bool mptcp_established_options(struct sock *sk,struct sk_buff *skb, *size += opt_size; remaining -= opt_size; +add_addr:if (mptcp_established_options_add_addr (sk, &opt_size, remaining, opts)) {net/mptcp/options.c +0
-1*size += opt_size; remaining -= opt_size;@@ -747,10 +764,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *sk, goto fully_established; } -/* If the first established packet does not contain MP_CAPABLE
net/mptcp/options.c static bool check_fully_established(struct · line 773
Quoted 10 lines
net/mptcp/options.c +4
-1+data +/* If the first established packet does not contain MP_CAPABLE +data or ADD_ADDR * then fallback to TCP */ -if (!mp_opt->mp_capable) { + if (!mp_opt->mp_capable && !mp_opt->add_addr) { subflow->mp_capable =0 ;pr_fallback (msk);__mptcp_do_fallback (msk);
I think the RFC is a bit unclear with this point, because in section 3.4.1. says:
"""
This [ADD_ADDR] option can be used at any time during a connection """
but also says that here we expect a mp_capable + data packet.
@Christoph, should we accept ADD_ADDR here or should we reject them?
Quoted 33 lines
net/mptcp/pm.c +2
-1@@ -172,7 +172,8 @@ void mptcp_pm_rm_addr_received(struct mptcp_sock *msk, u8 rm_id)/* path manager helpers */ -bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining, +bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, struct sock *ssk, + unsigned int remaining,struct
mptcp_addr_info*saddr, bool
*echo)
{net/mptcp/pm.c +4
-1int ret = false;@@ -183,16 +184,26 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining, if (!mptcp_pm_should_add_signal(msk)) goto out_unlock; -if (remaining <mptcp_add_addr_len (msk->pm.local.family)) +if (remaining <mptcp_add_addr_len (msk->pm.local.family)) { +if (msk->pm.local.family ==AF_INET6 ) +WRITE_ONCE (msk->pm.add_addr_nospc, true); goto out_unlock; + } *saddr = msk->pm.local; *echo =READ_ONCE (msk->pm.add_addr_echo);WRITE_ONCE (msk->pm.add_addr_signal, false);
net/mptcp/pm.c bool mptcp_pm_add_addr_signal(struct mptcp_sock · line 206
Quoted 10 lines
net/mptcp/pm.c +6
-0+WRITE_ONCE (msk->pm.add_addr_nospc, false); ret = true; out_unlock:spin_unlock_bh (&msk->pm.lock); + +if (READ_ONCE (msk->pm.add_addr_nospc)) { +pr_debug ("send ack for add_addr6" ); +tcp_send_ack (ssk); + }
I think we should pick-up a subflow and call tcp_send_ack() when invoking mptcp_pm_announce_addr(..., false), either directly in mptcp_pm_announce_addr() or better in a wrapping helper.
/P
Christoph Paasch
[MPTCP] Re: [MPTCP][PATCH v3 mptcp-next 1/2] mptcp: send out dedicated ADD_ADDR packet
Quoted 91 lines · Paolo Abeni
Quoted 34 lines · Geliang Tang
net/mptcp/options.c +1
-1@@ -584,7 +586,7 @@ static bool mptcp_established_options_add_addr(struct sock *sk, int len;if (!mptcp_pm_should_add_signal (msk) || - !(mptcp_pm_add_addr_signal (msk, remaining, &saddr, &echo))) + !(mptcp_pm_add_addr_signal (msk, sk, remaining, &saddr, &echo)))return false;net/mptcp/options.c +11
-0len =mptcp_add_addr_len (saddr.family);@@ -645,6 +647,17 @@ static bool mptcp_established_options_rm_addr(struct sock *sk, return true; } +static bool mptcp_check_add_addr_nospc (struct sock *sk,struct sk_buff *skb) +{ +struct mptcp_subflow_context *subflow =mptcp_subflow_ctx (sk); +struct mptcp_sock *msk =mptcp_sk (subflow->conn); + +if (skb &&skb_is_tcp_pure_ack (skb) &&READ_ONCE (msk- >pm.add_addr_nospc)) +return true; + +return false; +} +bool mptcp_established_options(struct sock *sk, struct
sk_buff*skb,
unsigned int *size, unsigned int
remaining,net/mptcp/options.c +0
-0struct mptcp_out_options *opts)net/mptcp/options.c bool mptcp_established_options(struct sock *sk, · line 676
Quoted 7 lines
net/mptcp/options.c +3
-0@@ -657,6 +670,9 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb, if (unlikely(mptcp_check_fallback(sk))) return false; +if (unlikely (mptcp_check_add_addr_nospc (sk, skb))) + goto add_addr; +I can't follow easily the code. Here we check the '
add_addr_nospc' field, but AFAICS, such field is initialized only later, bymptcp_pm_add_addr_signal(), called
frommptcp_established_options_add_addr().Should we instead set '
add_addr_nospc' inmptcp_pm_announce_addr()?Ninor note: the '
add_addr_nospc' name is a bit confusing to me, I would use instead something alike 'add_addr_ipv6', or even better we could change the 'add_addr_signal' type from bool to char, so that we could encode the addr type there. Then here we could check for 'add_addr_signal==AF_INET6' - possibly no need for a new field.Quoted 21 lines
(quoted diff) +0
-0if (mptcp_established_options_mp(sk, skb, &opt_size, remaining, opts))(quoted diff) +0
-0ret = true; else if (mptcp_established_options_dss(sk, skb, &opt_size,remaining,
net/mptcp/options.c +1
-0@@ -671,6 +687,7 @@ bool mptcp_established_options(struct sock *sk,struct sk_buff *skb, *size += opt_size; remaining -= opt_size; +add_addr:if (mptcp_established_options_add_addr (sk, &opt_size, remaining, opts)) {net/mptcp/options.c +0
-1*size += opt_size; remaining -= opt_size;@@ -747,10 +764,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *sk, goto fully_established; } -/* If the first established packet does not contain MP_CAPABLE net/mptcp/options.c static bool check_fully_established(struct · line 773
Quoted 10 lines
net/mptcp/options.c +4
-1+data +/* If the first established packet does not contain MP_CAPABLE +data or ADD_ADDR * then fallback to TCP */ -if (!mp_opt->mp_capable) { + if (!mp_opt->mp_capable && !mp_opt->add_addr) { subflow->mp_capable =0 ;pr_fallback (msk);__mptcp_do_fallback (msk);I think the RFC is a bit unclear with this point, because in section 3.4.1. says:
Quoted 7 lines
"""
This [ADD_ADDR] option can be used at any time during a connection """but also says that here we expect a
mp_capable+ data packet.@Christoph, should we accept
ADD_ADDRhere or should we reject them?
I think we should accept them. There are 2 things that can happen:
* MP_CAPABLE + data comes later on. In that case we can use the received addr.
Note, for this to happen I am assuming that the ADD_ADDR comes on an out-of-order packet and that the MP_CAPABLE will still come on the packet with relative sequence-number 1.
* No MP_CAPABLE on first data-packet. In that case we have a seamless fallback to regular TCP.
Does that help?
Christoph
Quoted 51 lines
Quoted 34 lines
net/mptcp/pm.c +2
-1@@ -172,7 +172,8 @@ void mptcp_pm_rm_addr_received(struct mptcp_sock *msk, u8 rm_id)/* path manager helpers */ -bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining, +bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, struct sock *ssk, + unsigned int remaining,struct
mptcp_addr_info*saddr, bool
*echo)
{net/mptcp/pm.c +4
-1int ret = false;@@ -183,16 +184,26 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining, if (!mptcp_pm_should_add_signal(msk)) goto out_unlock; -if (remaining <mptcp_add_addr_len (msk->pm.local.family)) +if (remaining <mptcp_add_addr_len (msk->pm.local.family)) { +if (msk->pm.local.family ==AF_INET6 ) +WRITE_ONCE (msk->pm.add_addr_nospc, true); goto out_unlock; + } *saddr = msk->pm.local; *echo =READ_ONCE (msk->pm.add_addr_echo);WRITE_ONCE (msk->pm.add_addr_signal, false);net/mptcp/pm.c bool mptcp_pm_add_addr_signal(struct mptcp_sock · line 206
Quoted 10 lines
net/mptcp/pm.c +6
-0+WRITE_ONCE (msk->pm.add_addr_nospc, false); ret = true; out_unlock:spin_unlock_bh (&msk->pm.lock); + +if (READ_ONCE (msk->pm.add_addr_nospc)) { +pr_debug ("send ack for add_addr6" ); +tcp_send_ack (ssk); + }I think we should pick-up a subflow and call
tcp_send_ack()when invokingmptcp_pm_announce_addr(..., false), either directly inmptcp_pm_announce_addr()or better in a wrapping helper./P
Matthieu Baerts
[MPTCP] Re: [MPTCP][PATCH v3 mptcp-next 1/2] mptcp: send out dedicated ADD_ADDR packet
Hi Christoph, Paolo, Geliang,
Quoted 2 lines · Christoph Paasch
Quoted 1 line · Paolo Abeni
On Mon, 2020-09-28 at 15:46 +0800, Geliang Tang wrote:
(...)
Quoted 23 lines
Quoted 15 lines
net/mptcp/options.c static bool check_fully_established(struct mptcp_sock *msk, struct sock *sk, · line 773
Quoted 11 lines
net/mptcp/options.c +4
-2-/* If the first established packet does not contain MP_CAPABLE +data +/* If the first established packet does not contain MP_CAPABLE +data or ADD_ADDR * then fallback to TCP */ -if (!mp_opt->mp_capable) { + if (!mp_opt->mp_capable && !mp_opt->add_addr) { subflow->mp_capable =0 ;pr_fallback (msk);__mptcp_do_fallback (msk);I think the RFC is a bit unclear with this point, because in section 3.4.1. says:
Quoted 7 lines
"""
This [ADD_ADDR] option can be used at any time during a connection """but also says that here we expect a
mp_capable+ data packet.@Christoph, should we accept
ADD_ADDRhere or should we reject them?
Quoted 7 lines
I think we should accept them. There are 2 things that can happen:
*
MP_CAPABLE+ data comes later on. In that case we can use the received addr.
Note, for this to happen I am assuming that theADD_ADDRcomes on an out-of-order packet and that theMP_CAPABLEwill still come on the packet with relative sequence-number 1.
If the ADD_ADDR comes on an out-of-order packet and because it is a ACK without data, is it not dropped earlier by the TCP stack?
I think we have this behaviour with mptcp.org version.
Cheers,
Matt
Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net
Christoph Paasch
[MPTCP] Re: [MPTCP][PATCH v3 mptcp-next 1/2] mptcp: send out dedicated ADD_ADDR packet
Quoted 39 lines · Matthieu Baerts
Hi Christoph, Paolo, Geliang,
Quoted 2 lines · Christoph Paasch
Quoted 1 line · Paolo Abeni
On Mon, 2020-09-28 at 15:46 +0800, Geliang Tang wrote:
(...)
Quoted 23 lines
Quoted 15 lines
net/mptcp/options.c static bool check_fully_established(struct mptcp_sock *msk, struct sock *sk, · line 773
Quoted 11 lines
net/mptcp/options.c +4
-2-/* If the first established packet does not contain MP_CAPABLE +data +/* If the first established packet does not contain MP_CAPABLE +data or ADD_ADDR * then fallback to TCP */ -if (!mp_opt->mp_capable) { + if (!mp_opt->mp_capable && !mp_opt->add_addr) { subflow->mp_capable =0 ;pr_fallback (msk);__mptcp_do_fallback (msk);I think the RFC is a bit unclear with this point, because in section 3.4.1. says:
Quoted 7 lines
"""
This [ADD_ADDR] option can be used at any time during a connection """but also says that here we expect a
mp_capable+ data packet.@Christoph, should we accept
ADD_ADDRhere or should we reject them?Quoted 7 lines
I think we should accept them. There are 2 things that can happen:
*
MP_CAPABLE+ data comes later on. In that case we can use the received addr.
Note, for this to happen I am assuming that theADD_ADDRcomes on an out-of-order packet and that theMP_CAPABLEwill still come on the packet with relative sequence-number 1.
Quoted 3 lines
If the
ADD_ADDRcomes on an out-of-order packet and because it is a ACK without data, is it not dropped earlier by the TCP stack?
I think we have this behaviour with mptcp.org version.
No, as far as I can see in mptcp.org we do parse the ADD_ADDR even if we haven't yet received an MP_CAPABLE with data.
cfr., mptcp_handle_options, called from tcp_validate_incoming, which is called even on ACKs without data.
Christoph
Quoted 6 lines
Cheers,
MattSignature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net