Commit 90a4aea8 authored by Geliang Tang's avatar Geliang Tang Committed by David S. Miller

mptcp: print out port and ahmac when receiving ADD_ADDR

This patch printed out more debugging information for the ADD_ADDR
suboption parsing on the incoming path.
Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0f5c9e3f
...@@ -242,9 +242,6 @@ static void mptcp_parse_option(const struct sk_buff *skb, ...@@ -242,9 +242,6 @@ static void mptcp_parse_option(const struct sk_buff *skb,
mp_opt->add_addr = 1; mp_opt->add_addr = 1;
mp_opt->addr_id = *ptr++; mp_opt->addr_id = *ptr++;
pr_debug("ADD_ADDR%s: id=%d, echo=%d",
(mp_opt->family == MPTCP_ADDR_IPVERSION_6) ? "6" : "",
mp_opt->addr_id, mp_opt->echo);
if (mp_opt->family == MPTCP_ADDR_IPVERSION_4) { if (mp_opt->family == MPTCP_ADDR_IPVERSION_4) {
memcpy((u8 *)&mp_opt->addr.s_addr, (u8 *)ptr, 4); memcpy((u8 *)&mp_opt->addr.s_addr, (u8 *)ptr, 4);
ptr += 4; ptr += 4;
...@@ -269,6 +266,9 @@ static void mptcp_parse_option(const struct sk_buff *skb, ...@@ -269,6 +266,9 @@ static void mptcp_parse_option(const struct sk_buff *skb,
mp_opt->ahmac = get_unaligned_be64(ptr); mp_opt->ahmac = get_unaligned_be64(ptr);
ptr += 8; ptr += 8;
} }
pr_debug("ADD_ADDR%s: id=%d, ahmac=%llu, echo=%d, port=%d",
(mp_opt->family == MPTCP_ADDR_IPVERSION_6) ? "6" : "",
mp_opt->addr_id, mp_opt->ahmac, mp_opt->echo, mp_opt->port);
break; break;
case MPTCPOPT_RM_ADDR: case MPTCPOPT_RM_ADDR:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment