aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/input.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-09-18 03:17:10 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-09-18 03:17:10 -0400
commit21f130a2370ba837cdfc5204ebe52e7c664fec3d (patch)
tree7f8a30088d8d39eab9350c59b6638661309ffe89 /net/dccp/input.c
parentbc5e8fdfc622b03acf5ac974a1b8b26da6511c99 (diff)
parentc58ec93245a1fb7354f9e331960380827b9f41db (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/dccp/input.c')
-rw-r--r--net/dccp/input.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/dccp/input.c b/net/dccp/input.c
index c74034cf7ede..062e9f8359d0 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -384,9 +384,9 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk,
384 } 384 }
385 385
386out_invalid_packet: 386out_invalid_packet:
387 return 1; /* dccp_v4_do_rcv will send a reset, but... 387 /* dccp_v4_do_rcv will send a reset */
388 FIXME: the reset code should be 388 DCCP_SKB_CB(skb)->dccpd_reset_code = DCCP_RESET_CODE_PACKET_ERROR;
389 DCCP_RESET_CODE_PACKET_ERROR */ 389 return 1;
390} 390}
391 391
392static int dccp_rcv_respond_partopen_state_process(struct sock *sk, 392static int dccp_rcv_respond_partopen_state_process(struct sock *sk,
@@ -433,6 +433,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
433 struct dccp_hdr *dh, unsigned len) 433 struct dccp_hdr *dh, unsigned len)
434{ 434{
435 struct dccp_sock *dp = dccp_sk(sk); 435 struct dccp_sock *dp = dccp_sk(sk);
436 struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb);
436 const int old_state = sk->sk_state; 437 const int old_state = sk->sk_state;
437 int queued = 0; 438 int queued = 0;
438 439
@@ -473,7 +474,8 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
473 if (dh->dccph_type == DCCP_PKT_RESET) 474 if (dh->dccph_type == DCCP_PKT_RESET)
474 goto discard; 475 goto discard;
475 476
476 /* Caller (dccp_v4_do_rcv) will send Reset(No Connection)*/ 477 /* Caller (dccp_v4_do_rcv) will send Reset */
478 dcb->dccpd_reset_code = DCCP_RESET_CODE_NO_CONNECTION;
477 return 1; 479 return 1;
478 } 480 }
479 481
@@ -487,8 +489,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
487 if (dccp_parse_options(sk, skb)) 489 if (dccp_parse_options(sk, skb))
488 goto discard; 490 goto discard;
489 491
490 if (DCCP_SKB_CB(skb)->dccpd_ack_seq != 492 if (dcb->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
491 DCCP_PKT_WITHOUT_ACK_SEQ)
492 dccp_event_ack_recv(sk, skb); 493 dccp_event_ack_recv(sk, skb);
493 494
494 ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb); 495 ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb);
@@ -500,7 +501,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
500 */ 501 */
501 if (dp->dccps_options.dccpo_send_ack_vector) { 502 if (dp->dccps_options.dccpo_send_ack_vector) {
502 if (dccp_ackpkts_add(dp->dccps_hc_rx_ackpkts, sk, 503 if (dccp_ackpkts_add(dp->dccps_hc_rx_ackpkts, sk,
503 DCCP_SKB_CB(skb)->dccpd_seq, 504 dcb->dccpd_seq,
504 DCCP_ACKPKTS_STATE_RECEIVED)) 505 DCCP_ACKPKTS_STATE_RECEIVED))
505 goto discard; 506 goto discard;
506 /* 507 /*
@@ -551,8 +552,7 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
551 dh->dccph_type == DCCP_PKT_REQUEST) || 552 dh->dccph_type == DCCP_PKT_REQUEST) ||
552 (sk->sk_state == DCCP_RESPOND && 553 (sk->sk_state == DCCP_RESPOND &&
553 dh->dccph_type == DCCP_PKT_DATA)) { 554 dh->dccph_type == DCCP_PKT_DATA)) {
554 dccp_send_sync(sk, DCCP_SKB_CB(skb)->dccpd_seq, 555 dccp_send_sync(sk, dcb->dccpd_seq, DCCP_PKT_SYNC);
555 DCCP_PKT_SYNC);
556 goto discard; 556 goto discard;
557 } else if (dh->dccph_type == DCCP_PKT_CLOSEREQ) { 557 } else if (dh->dccph_type == DCCP_PKT_CLOSEREQ) {
558 dccp_rcv_closereq(sk, skb); 558 dccp_rcv_closereq(sk, skb);
@@ -563,13 +563,13 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
563 } 563 }
564 564
565 if (unlikely(dh->dccph_type == DCCP_PKT_SYNC)) { 565 if (unlikely(dh->dccph_type == DCCP_PKT_SYNC)) {
566 dccp_send_sync(sk, DCCP_SKB_CB(skb)->dccpd_seq, 566 dccp_send_sync(sk, dcb->dccpd_seq, DCCP_PKT_SYNCACK);
567 DCCP_PKT_SYNCACK);
568 goto discard; 567 goto discard;
569 } 568 }
570 569
571 switch (sk->sk_state) { 570 switch (sk->sk_state) {
572 case DCCP_CLOSED: 571 case DCCP_CLOSED:
572 dcb->dccpd_reset_code = DCCP_RESET_CODE_NO_CONNECTION;
573 return 1; 573 return 1;
574 574
575 case DCCP_REQUESTING: 575 case DCCP_REQUESTING: