]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: ADD_ADDRs with echo bit are smaller
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Sat, 3 Oct 2020 15:36:56 +0000 (17:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Oct 2020 00:36:37 +0000 (17:36 -0700)
commit91b6b5ad5b746248ccfecf77dda0738e388889f1
tree0dedcb7f27912743dbbeb007bc07f10ce32c9198
parent9135dbd1772dad448e5d75dc1fc448cfed41dbee
mptcp: ADD_ADDRs with echo bit are smaller

The MPTCP ADD_ADDR suboption with echo-flag=1 has no HMAC, the size is
smaller than the one initially sent without echo-flag=1. We then need to
use the correct size everywhere when we need this echo bit.

Before this patch, the wrong size was reserved but the correct amount of
bytes were written (and read): the remaining bytes contained garbage.

Fixes: 450008aef06f ("mptcp: send out ADD_ADDR with echo flag")
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/95
Reported-and-tested-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/options.c
net/mptcp/pm.c
net/mptcp/protocol.h