* [PATCH 5/5]: Send Reset upon Sync in state REQUEST
@ 2007-06-20 9:56 Gerrit Renker
0 siblings, 0 replies; 3+ messages in thread
From: Gerrit Renker @ 2007-06-20 9:56 UTC (permalink / raw)
To: dccp
[DCCP]: Send Reset upon Sync in state REQUEST
This fixes the code to correspond to RFC 4340, 7.5.4, which states the
exception that a Sync received in state REQUEST generates a Reset (not
a SyncAck).
To achieve this, only a small change is required. Since
dccp_rcv_request_sent_state_process() already uses the correct Reset Code
number 4 ("Packet Error"), we only need to shift 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 | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -551,11 +551,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;
@@ -586,6 +581,9 @@ 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) {
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 5/5]: Send Reset upon Sync in state REQUEST
@ 2007-07-01 4:02 Ian McDonald
0 siblings, 0 replies; 3+ messages in thread
From: Ian McDonald @ 2007-07-01 4:02 UTC (permalink / raw)
To: dccp
On 6/20/07, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> [DCCP]: Send Reset upon Sync in state REQUEST
>
> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
--
Web: http://wand.net.nz/~iam4/
Blog: http://iansblog.jandi.co.nz
WAND Network Research Group
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 5/5]: Send Reset upon Sync in state REQUEST
@ 2007-04-09 9:59 Gerrit Renker
0 siblings, 0 replies; 3+ messages in thread
From: Gerrit Renker @ 2007-04-09 9:59 UTC (permalink / raw)
To: dccp
[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);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-01 4:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-20 9:56 [PATCH 5/5]: Send Reset upon Sync in state REQUEST Gerrit Renker
-- strict thread matches above, loose matches on Subject: below --
2007-07-01 4:02 Ian McDonald
2007-04-09 9:59 Gerrit Renker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox