Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6383
b: refs/heads/master
c: c59eab4
h: refs/heads/master
i:
  6381: 7536fe7
  6379: b23cb1a
  6375: d581bf6
  6367: c759821
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Aug 29, 2005
1 parent f6b9c5a commit 95d3b89
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 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: 5480855bfbc125f34d9b752689bb9a64da7e1fc6
refs/heads/master: c59eab4637dbc3f832503be4ccb9213b0f323d92
11 changes: 6 additions & 5 deletions trunk/net/dccp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
lawl = dp->dccps_awl;

if (dh->dccph_type == DCCP_PKT_CLOSEREQ ||
dh->dccph_type == DCCP_PKT_CLOSE ||
dh->dccph_type == DCCP_PKT_RESET) {
dh->dccph_type == DCCP_PKT_CLOSE ||
dh->dccph_type == DCCP_PKT_RESET) {
lswl = dp->dccps_gsr;
dccp_inc_seqno(&lswl);
lawl = dp->dccps_gar;
Expand All @@ -136,7 +136,8 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
DCCP_PKT_WITHOUT_ACK_SEQ))
dp->dccps_gar = DCCP_SKB_CB(skb)->dccpd_ack_seq;
} else {
LIMIT_NETDEBUG("Step 6 failed, sending SYNC...\n");
LIMIT_NETDEBUG(KERN_WARNING "DCCP: Step 6 failed, "
"sending SYNC...\n");
dccp_send_sync(sk, DCCP_SKB_CB(skb)->dccpd_seq, DCCP_PKT_SYNC);
return -1;
}
Expand Down Expand Up @@ -168,8 +169,8 @@ int dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
if (dccp_ackpkts_add(dp->dccps_hc_rx_ackpkts,
DCCP_SKB_CB(skb)->dccpd_seq,
DCCP_ACKPKTS_STATE_RECEIVED)) {
LIMIT_NETDEBUG(KERN_INFO "DCCP: acknowledgeable "
"packets buffer full!\n");
LIMIT_NETDEBUG(KERN_WARNING "DCCP: acknowledgeable "
"packets buffer full!\n");
ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1;
inet_csk_schedule_ack(sk);
inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
Expand Down
23 changes: 13 additions & 10 deletions trunk/net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,15 +1008,15 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
return 1;

if (!pskb_may_pull(skb, sizeof(struct dccp_hdr))) {
printk(KERN_WARNING "DCCP: pskb_may_pull failed\n");
LIMIT_NETDEBUG(KERN_WARNING "DCCP: pskb_may_pull failed\n");
return 1;
}

dh = dccp_hdr(skb);

/* If the packet type is not understood, drop packet and return */
if (dh->dccph_type >= DCCP_PKT_INVALID) {
printk(KERN_WARNING "DCCP: invalid packet type\n");
LIMIT_NETDEBUG(KERN_WARNING "DCCP: invalid packet type\n");
return 1;
}

Expand All @@ -1025,14 +1025,16 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
* packet, drop packet and return
*/
if (dh->dccph_doff < dccp_hdr_len(skb) / sizeof(u32)) {
printk(KERN_WARNING "DCCP: Offset(%u) too small 1\n",
dh->dccph_doff);
LIMIT_NETDEBUG(KERN_WARNING "DCCP: P.Data Offset(%u) "
"too small 1\n",
dh->dccph_doff);
return 1;
}

if (!pskb_may_pull(skb, dh->dccph_doff * sizeof(u32))) {
printk(KERN_WARNING "DCCP: P.Data Offset(%u) too small 2\n",
dh->dccph_doff);
LIMIT_NETDEBUG(KERN_WARNING "DCCP: P.Data Offset(%u) "
"too small 2\n",
dh->dccph_doff);
return 1;
}

Expand All @@ -1046,16 +1048,17 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
dh->dccph_type != DCCP_PKT_DATA &&
dh->dccph_type != DCCP_PKT_ACK &&
dh->dccph_type != DCCP_PKT_DATAACK) {
printk(KERN_WARNING "DCCP: P.type (%s) not Data, Ack nor "
"DataAck and P.X == 0\n",
dccp_packet_name(dh->dccph_type));
LIMIT_NETDEBUG(KERN_WARNING "DCCP: P.type (%s) not Data, Ack "
"nor DataAck and P.X == 0\n",
dccp_packet_name(dh->dccph_type));
return 1;
}

/* If the header checksum is incorrect, drop packet and return */
if (dccp_v4_verify_checksum(skb, skb->nh.iph->saddr,
skb->nh.iph->daddr) < 0) {
printk(KERN_WARNING "DCCP: header checksum is incorrect\n");
LIMIT_NETDEBUG(KERN_WARNING "DCCP: header checksum is "
"incorrect\n");
return 1;
}

Expand Down

0 comments on commit 95d3b89

Please sign in to comment.