All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [PATCH] mptcp: Remove protocol spec comments from mptcp_parse_option
@ 2020-01-18  0:21 Peter Krystad
  0 siblings, 0 replies; only message in thread
From: Peter Krystad @ 2020-01-18  0:21 UTC (permalink / raw)
  To: mptcp 

[-- Attachment #1: Type: text/plain, Size: 3410 bytes --]

They are already out-of-date. Let them read the spec, or least
look at the pictures!

squashto: Handle MPTCP TCP options

Signed-off-by: Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/options.c | 60 ---------------------------------------------
 1 file changed, 60 deletions(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 81d8704cbd3f..51290ec970bd 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -24,12 +24,6 @@ void mptcp_parse_option(const struct sk_buff *skb, const unsigned char *ptr,
 	u8 flags;
 
 	switch (subtype) {
-	/* MPTCPOPT_MP_CAPABLE
-	 * 0: 4MSB=subtype, 4LSB=version
-	 * 1: Handshake flags
-	 * 2-9: Sender key
-	 * 10-17: Receiver key (optional)
-	 */
 	case MPTCPOPT_MP_CAPABLE:
 		/* strict size checking */
 		if (!(TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN)) {
@@ -102,22 +96,6 @@ void mptcp_parse_option(const struct sk_buff *skb, const unsigned char *ptr,
 			 mp_opt->rcvr_key, mp_opt->data_len);
 		break;
 
-	/* MPTCPOPT_MP_JOIN
-	 * Initial SYN
-	 * 0: 4MSB=subtype, 000, 1LSB=Backup
-	 * 1: Address ID
-	 * 2-5: Receiver token
-	 * 6-9: Sender random number
-	 * SYN/ACK response
-	 * 0: 4MSB=subtype, 000, 1LSB=Backup
-	 * 1: Address ID
-	 * 2-9: Sender truncated HMAC
-	 * 10-13: Sender random number
-	 * Third ACK
-	 * 0: 4MSB=subtype, 0000
-	 * 1: 0 (Reserved)
-	 * 2-21: Sender HMAC
-	 */
 	case MPTCPOPT_MP_JOIN:
 		mp_opt->mp_join = 1;
 		if (opsize == TCPOLEN_MPTCP_MPJ_SYN) {
@@ -150,17 +128,6 @@ void mptcp_parse_option(const struct sk_buff *skb, const unsigned char *ptr,
 		}
 		break;
 
-
-	/* MPTCPOPT_DSS
-	 * 0: 4MSB=subtype, 0000
-	 * 1: 3MSB=0, F=Data FIN, m=DSN length, M=has DSN/SSN/DLL/checksum,
-	 *    a=DACK length, A=has DACK
-	 * 0, 4, or 8 bytes of DACK (depending on A/a)
-	 * 0, 4, or 8 bytes of DSN (depending on M/m)
-	 * 0 or 4 bytes of SSN (depending on M)
-	 * 0 or 2 bytes of DLL (depending on M)
-	 * 0 or 2 bytes of checksum (depending on M)
-	 */
 	case MPTCPOPT_DSS:
 		pr_debug("DSS");
 		ptr++;
@@ -243,12 +210,6 @@ void mptcp_parse_option(const struct sk_buff *skb, const unsigned char *ptr,
 
 		break;
 
-	/* MPTCPOPT_ADD_ADDR
-	 * 0: 4MSB=subtype, 4LSB=IP version (4 or 6)
-	 * 1: Address ID
-	 * 4 or 16 bytes of address (depending on ip version)
-	 * 0 or 2 bytes of port (depending on length)
-	 */
 	case MPTCPOPT_ADD_ADDR:
 		if (opsize != TCPOLEN_MPTCP_ADD_ADDR &&
 		    opsize != TCPOLEN_MPTCP_ADD_ADDR6)
@@ -282,11 +243,6 @@ void mptcp_parse_option(const struct sk_buff *skb, const unsigned char *ptr,
 #endif
 		break;
 
-	/* MPTCPOPT_RM_ADDR
-	 * 0: 4MSB=subtype, 0000
-	 * 1: Address ID
-	 * Additional bytes: More address IDs (depending on length)
-	 */
 	case MPTCPOPT_RM_ADDR:
 		if (opsize != TCPOLEN_MPTCP_RM_ADDR)
 			break;
@@ -296,22 +252,6 @@ void mptcp_parse_option(const struct sk_buff *skb, const unsigned char *ptr,
 		pr_debug("RM_ADDR: id=%d", mp_opt->addr_id);
 		break;
 
-	/* MPTCPOPT_MP_PRIO
-	 * 0: 4MSB=subtype, 000, 1LSB=Backup
-	 * 1: Address ID (optional, current addr implied if not present)
-	 */
-
-	/* MPTCPOPT_MP_FAIL
-	 * 0: 4MSB=subtype, 0000
-	 * 1: 0 (Reserved)
-	 * 2-9: DSN
-	 */
-
-	/* MPTCPOPT_MP_FASTCLOSE
-	 * 0: 4MSB=subtype, 0000
-	 * 1: 0 (Reserved)
-	 * 2-9: Receiver key
-	 */
 	default:
 		break;
 	}
-- 
2.17.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-18  0:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-18  0:21 [MPTCP] [PATCH] mptcp: Remove protocol spec comments from mptcp_parse_option Peter Krystad

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.