From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: [PATCH 5/5]: Send Reset upon Sync in state REQUEST
Date: Mon, 09 Apr 2007 09:59:01 +0000 [thread overview]
Message-ID: <200704091059.01152@strip-the-willow> (raw)
[DCCP]: Send Reset upon Sync in state REQUEST
This makes a small update so that the code corresponds to RFC 4340, 7.5.4,
which has the exception that a Sync received in state REQUEST generates
a Reset (not a SyncAck).
This is almost already supported by dccp_rcv_request_sent_state_process(),
including the correct Reset Code number 4 ("Packet Error"); all that has to be
done (and is done here) is shifting the if-statement a few lines further down.
(To test this case: replace DCCP_PKT_RESPONSE with DCCP_PKT_SYNC
in dccp_make_response.)
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/input.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -575,11 +575,6 @@ int dccp_rcv_state_process(struct sock *
return 0;
}
- if (unlikely(dh->dccph_type = DCCP_PKT_SYNC)) {
- dccp_send_sync(sk, dcb->dccpd_seq, DCCP_PKT_SYNCACK);
- goto discard;
- }
-
switch (sk->sk_state) {
case DCCP_CLOSED:
dcb->dccpd_reset_code = DCCP_RESET_CODE_NO_CONNECTION;
@@ -610,8 +605,12 @@ int dccp_rcv_state_process(struct sock *
sk_wake_async(sk, 0, POLL_OUT);
break;
}
+ } else if (unlikely(dh->dccph_type = DCCP_PKT_SYNC)) {
+ dccp_send_sync(sk, dcb->dccpd_seq, DCCP_PKT_SYNCACK);
+ goto discard;
}
+
if (!queued) {
discard:
__kfree_skb(skb);
next reply other threads:[~2007-04-09 9:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-09 9:59 Gerrit Renker [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-06-20 9:56 [PATCH 5/5]: Send Reset upon Sync in state REQUEST Gerrit Renker
2007-07-01 4:02 Ian McDonald
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=200704091059.01152@strip-the-willow \
--to=gerrit@erg.abdn.ac.uk \
--cc=dccp@vger.kernel.org \
/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 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.