mptcp: unify ADD_ADDR and echo suboptions writing
authorGeliang Tang <geliangtang@gmail.com>
Wed, 9 Dec 2020 23:51:18 +0000 (15:51 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Dec 2020 03:02:15 +0000 (19:02 -0800)
commit6eb3d1e350d1d166e6210a2abc310dbee5f03247
tree8689e4da35064c05e70fe8e14c6da5fd03f1faad
parentdc528d5bcc2daa00940e034bb9922b65b52b5e60
mptcp: unify ADD_ADDR and echo suboptions writing

There are two differences between ADD_ADDR suboption and ADD_ADDR echo
suboption: The length of the former is 8 octets longer than the length
of the latter. The former's echo-flag is 0, and latter's echo-flag is 1.

This patch added two local variables, len and echo, to unify ADD_ADDR
and ADD_ADDR echo suboptions writing.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/options.c