]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: fix ADD_ADDR HMAC in case port is specified
authorDavide Caratti <dcaratti@redhat.com>
Mon, 15 Mar 2021 10:41:16 +0000 (11:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Mar 2021 23:43:01 +0000 (16:43 -0700)
commit13832ae2755395b2585500c85b64f5109a44227e
tree41bb2eba0204c32cd1a198d3e9bf8b5023473371
parent7233da86697efef41288f8b713c10c2499cffe85
mptcp: fix ADD_ADDR HMAC in case port is specified

Currently, Linux computes the HMAC contained in ADD_ADDR sub-option using
the Address Id and the IP Address, and hardcodes a destination port equal
to zero. This is not ok for ADD_ADDR with port: ensure to account for the
endpoint port when computing the HMAC, in compliance with RFC8684 ยง3.4.1.

Fixes: 22fb85ffaefb ("mptcp: add port support for ADD_ADDR suboption writing")
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Acked-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/options.c