diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 9032174b446a69dfcdb844047dee3a8395e945de..9315f6a8343a70dc27361ebf0e4064761e177765 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -577,10 +577,14 @@ static inline bool mptcp_pm_should_rm_signal(struct mptcp_sock *msk) static inline unsigned int mptcp_add_addr_len(int family, bool echo) { - if (family == AF_INET) - return echo ? TCPOLEN_MPTCP_ADD_ADDR_BASE - : TCPOLEN_MPTCP_ADD_ADDR; - return echo ? TCPOLEN_MPTCP_ADD_ADDR6_BASE : TCPOLEN_MPTCP_ADD_ADDR6; + u8 len = TCPOLEN_MPTCP_ADD_ADDR_BASE; + + if (family == AF_INET6) + len = TCPOLEN_MPTCP_ADD_ADDR6_BASE; + if (!echo) + len += MPTCPOPT_THMAC_LEN; + + return len; } bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining,