Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08a29e41 authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller
Browse files

[DCCP]: Update comments on precisely which packets can be retransmitted



This updates program documentation: spell out precise conditions about
which packets are eligible for retransmission (which is actually quite
hard to extract from RFC 4340).

It is based on the following table derived from RFC 4340:

+-----------+---------------------------------+---------------------+
|   Type    | Retransmit?                     |  Remark             |
+-----------+---------------------------------+---------------------+
| Request   |  in client-REQUEST state        | sec. 8.1.1          |
| Response  |  NEVER                          | SHOULD NOT, 8.1.3   |
| Data      |  NEVER                          | unreliable protocol |
| Ack       |  possible in client-PARTOPEN    | sec. 8.1.5          |
| DataAck   |  NEVER                          | unreliable protocol |
| CloseReq  |  only in server-CLOSEREQ state  | MUST, sec. 8.3      |
| Close     |  in node-CLOSING state          | MUST, sec. 8.3      |
+-----------+-------------------------------------------------------+
| Reset     |  only in response to other packets                    |
| Sync      |  only in response to sequence-invalid packets (7.5.4) |
| SyncAck   |  only in response to Sync packets                     |
+-----------+-------------------------------------------------------+

Hence the only packets eligible for retransmission are:
       * Requests in client-REQUEST  state (sec. 8.1.1)
       * Acks     in client-PARTOPEN state (sec. 8.1.5)
       * CloseReq in server-CLOSEREQ state (sec. 8.3)
       * Close    in   node-CLOSING  state (sec. 8.3)

I had meant to put in a check for these types too, but have left that
for later.

Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
parent 75356f27
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -142,7 +142,7 @@ static void dccp_retransmit_timer(struct sock *sk)


	/* retransmit timer is used for feature negotiation throughout
	/* retransmit timer is used for feature negotiation throughout
	 * connection.  In this case, no packet is re-transmitted, but rather an
	 * connection.  In this case, no packet is re-transmitted, but rather an
	 * ack is generated and pending changes are splaced into its options.
	 * ack is generated and pending changes are placed into its options.
	 */
	 */
	if (sk->sk_send_head == NULL) {
	if (sk->sk_send_head == NULL) {
		dccp_pr_debug("feat negotiation retransmit timeout %p\n", sk);
		dccp_pr_debug("feat negotiation retransmit timeout %p\n", sk);
@@ -154,9 +154,11 @@ static void dccp_retransmit_timer(struct sock *sk)
	/*
	/*
	 * sk->sk_send_head has to have one skb with
	 * sk->sk_send_head has to have one skb with
	 * DCCP_SKB_CB(skb)->dccpd_type set to one of the retransmittable DCCP
	 * DCCP_SKB_CB(skb)->dccpd_type set to one of the retransmittable DCCP
	 * packet types (REQUEST, RESPONSE, the ACK in the 3way handshake
	 * packet types. The only packets eligible for retransmission are:
	 * (PARTOPEN timer), etc).
	 * 	-- Requests in client-REQUEST  state (sec. 8.1.1)
	 */
	 * 	-- Acks     in client-PARTOPEN state (sec. 8.1.5)
	 * 	-- CloseReq in server-CLOSEREQ state (sec. 8.3)
	 * 	-- Close    in   node-CLOSING  state (sec. 8.3)                */
	BUG_TRAP(sk->sk_send_head != NULL);
	BUG_TRAP(sk->sk_send_head != NULL);


	/* 
	/*