]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: bugfix for RM_ADDR option parsing
authorGeliang Tang <geliangtang@gmail.com>
Mon, 8 Jun 2020 10:47:54 +0000 (18:47 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jun 2020 02:09:41 +0000 (19:09 -0700)
commit3dba0f0ccd2985f52ca8b2ae86680e7c0f367b2b
treea73fec9f2f89599077b500f123242a131af53072
parentf419578cc6a3af260340666574477ad02a38e35e
mptcp: bugfix for RM_ADDR option parsing

In MPTCPOPT_RM_ADDR option parsing, the pointer "ptr" pointed to the
"Subtype" octet, the pointer "ptr+1" pointed to the "Address ID" octet:

  +-------+-------+---------------+
  |Subtype|(resvd)|   Address ID  |
  +-------+-------+---------------+
  |               |
 ptr            ptr+1

We should set mp_opt->rm_id to the value of "ptr+1", not "ptr". This patch
will fix this bug.

Fixes: 6628295c62fd ("mptcp: Add ADD_ADDR handling")
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/options.c