Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15581
b: refs/heads/master
c: 709dd3a
h: refs/heads/master
i:
  15579: 326b6cc
v: v3
  • Loading branch information
Andrea Bittau authored and David S. Miller committed Jan 3, 2006
1 parent cb4106c commit 06b6603
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5062430c5cc526655e3d10c670fc9c263656f66c
refs/heads/master: 709dd3aaf5304993083c2297c73f5531c36fba5a
56 changes: 34 additions & 22 deletions trunk/net/dccp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,29 +151,12 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
return 0;
}

int dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
const struct dccp_hdr *dh, const unsigned len)
static inline int __dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
const struct dccp_hdr *dh,
const unsigned len)
{
struct dccp_sock *dp = dccp_sk(sk);

if (dccp_check_seqno(sk, skb))
goto discard;

if (dccp_parse_options(sk, skb))
goto discard;

if (DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
dccp_event_ack_recv(sk, skb);

if (dp->dccps_options.dccpo_send_ack_vector &&
dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
DCCP_SKB_CB(skb)->dccpd_seq,
DCCP_ACKVEC_STATE_RECEIVED))
goto discard;

ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb);
ccid_hc_tx_packet_recv(dp->dccps_hc_tx_ccid, sk, skb);

switch (dccp_hdr(skb)->dccph_type) {
case DCCP_PKT_DATAACK:
case DCCP_PKT_DATA:
Expand Down Expand Up @@ -250,6 +233,35 @@ int dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
return 0;
}

int dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
const struct dccp_hdr *dh, const unsigned len)
{
struct dccp_sock *dp = dccp_sk(sk);

if (dccp_check_seqno(sk, skb))
goto discard;

if (dccp_parse_options(sk, skb))
goto discard;

if (DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
dccp_event_ack_recv(sk, skb);

if (dp->dccps_options.dccpo_send_ack_vector &&
dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
DCCP_SKB_CB(skb)->dccpd_seq,
DCCP_ACKVEC_STATE_RECEIVED))
goto discard;

ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb);
ccid_hc_tx_packet_recv(dp->dccps_hc_tx_ccid, sk, skb);

return __dccp_rcv_established(sk, skb, dh, len);
discard:
__kfree_skb(skb);
return 0;
}

EXPORT_SYMBOL_GPL(dccp_rcv_established);

static int dccp_rcv_request_sent_state_process(struct sock *sk,
Expand Down Expand Up @@ -400,9 +412,9 @@ static int dccp_rcv_respond_partopen_state_process(struct sock *sk,

if (dh->dccph_type == DCCP_PKT_DATAACK ||
dh->dccph_type == DCCP_PKT_DATA) {
dccp_rcv_established(sk, skb, dh, len);
__dccp_rcv_established(sk, skb, dh, len);
queued = 1; /* packet was queued
(by dccp_rcv_established) */
(by __dccp_rcv_established) */
}
break;
}
Expand Down

0 comments on commit 06b6603

Please sign in to comment.