From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: davem@davemloft.net
Cc: dccp@vger.kernel.org, netdev@vger.kernel.org,
Samuel Jero <sj323707@ohio.edu>
Subject: [PATCH 3/7] dccp: send Confirm options only once
Date: Mon, 25 Jul 2011 07:36:32 -0600 [thread overview]
Message-ID: <1311600996-6712-4-git-send-email-gerrit@erg.abdn.ac.uk> (raw)
In-Reply-To: <test_tree_patch_set_update_2011-07-25>
From: Samuel Jero <sj323707@ohio.edu>
If a connection is in the OPEN state, remove feature negotiation Confirm
options from the list of options after sending them once; as such options
are NOT supposed to be retransmitted and are ONLY supposed to be sent in
response to a Change option (RFC 4340 6.2).
Signed-off-by: Samuel Jero <sj323707@ohio.edu>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/feat.c | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -665,11 +665,22 @@ int dccp_feat_insert_opts(struct dccp_sock *dp, struct dccp_request_sock *dreq,
return -1;
if (pos->needs_mandatory && dccp_insert_option_mandatory(skb))
return -1;
- /*
- * Enter CHANGING after transmitting the Change option (6.6.2).
- */
- if (pos->state == FEAT_INITIALISING)
- pos->state = FEAT_CHANGING;
+
+ if (skb->sk->sk_state == DCCP_OPEN &&
+ (opt == DCCPO_CONFIRM_R || opt == DCCPO_CONFIRM_L)) {
+ /*
+ * Confirms don't get retransmitted (6.6.3) once the
+ * connection is in state OPEN
+ */
+ dccp_feat_list_pop(pos);
+ } else {
+ /*
+ * Enter CHANGING after transmitting the Change
+ * option (6.6.2).
+ */
+ if (pos->state == FEAT_INITIALISING)
+ pos->state = FEAT_CHANGING;
+ }
}
return 0;
}
next prev parent reply other threads:[~2011-07-25 13:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <test_tree_patch_set_update_2011-07-25>
2011-07-25 13:36 ` net-next-2.6 [PATCH 0/7] dccp: add support for dynamic parameter updates Gerrit Renker
2011-08-01 7:10 ` David Miller
2011-08-01 14:43 ` Gerrit Renker
2011-08-02 0:37 ` David Miller
2011-07-25 13:36 ` [PATCH 1/7] dccp: support for the exchange of NN options in established state 1/2 Gerrit Renker
2011-07-25 13:36 ` [PATCH 2/7] dccp: support for exchanging of NN options in established state 2/2 Gerrit Renker
2011-07-25 13:36 ` Gerrit Renker [this message]
2011-07-25 13:36 ` [PATCH 4/7] dccp ccid-2: use feature-negotiation to report Ack Ratio changes Gerrit Renker
2011-07-25 13:36 ` [PATCH 5/7] dccp ccid-2: prevent cwnd > Sequence Window Gerrit Renker
2011-07-25 13:36 ` [PATCH 6/7] dccp ccid-2: increment cwnd correctly Gerrit Renker
2011-07-25 13:36 ` [PATCH 7/7] dccp ccid-2: check Ack Ratio when reducing cwnd Gerrit Renker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1311600996-6712-4-git-send-email-gerrit@erg.abdn.ac.uk \
--to=gerrit@erg.abdn.ac.uk \
--cc=davem@davemloft.net \
--cc=dccp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sj323707@ohio.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).