From e92ae93a8aa66aea12935420cb22d4df1c18d023 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Wed, 17 Aug 2005 03:10:59 -0300 Subject: [DCCP]: Send SYNCACK packets in response to SYNC packets Also fix step 6 when receiving SYNC or SYNCACK packets, i.e. we were not using the updated swl. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- net/dccp/ipv4.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'net/dccp/ipv4.c') diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index bc3cfc0533cc..335e00e9631d 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c @@ -376,7 +376,7 @@ static inline void dccp_do_pmtu_discovery(struct sock *sk, * probing, since DCCP-Sync probes do not risk application * data loss. */ - dccp_send_sync(sk, dp->dccps_gsr); + dccp_send_sync(sk, dp->dccps_gsr, DCCP_PKT_SYNC); } /* else let the usual retransmit timer handle it */ } @@ -1008,7 +1008,7 @@ static inline int dccp_invalid_packet(struct sk_buff *skb) return 1; if (!pskb_may_pull(skb, sizeof(struct dccp_hdr))) { - dccp_pr_debug("pskb_may_pull failed\n"); + printk(KERN_WARNING "DCCP: pskb_may_pull failed\n"); return 1; } @@ -1016,7 +1016,7 @@ static inline int dccp_invalid_packet(struct sk_buff *skb) /* If the packet type is not understood, drop packet and return */ if (dh->dccph_type >= DCCP_PKT_INVALID) { - dccp_pr_debug("invalid packet type\n"); + printk(KERN_WARNING "DCCP: invalid packet type\n"); return 1; } @@ -1025,12 +1025,13 @@ 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)) { - dccp_pr_debug("Offset(%u) too small 1\n", dh->dccph_doff); + printk(KERN_WARNING "DCCP: Offset(%u) too small 1\n", + dh->dccph_doff); return 1; } if (!pskb_may_pull(skb, dh->dccph_doff * sizeof(u32))) { - dccp_pr_debug("P.Data Offset(%u) too small 2\n", + printk(KERN_WARNING "DCCP: P.Data Offset(%u) too small 2\n", dh->dccph_doff); return 1; } @@ -1045,15 +1046,16 @@ 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) { - dccp_pr_debug("P.type (%s) not Data, Ack nor DataAck and " - "P.X == 0\n", dccp_packet_name(dh->dccph_type)); + printk(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) { - dccp_pr_debug("header checksum is incorrect\n"); + printk(KERN_WARNING "DCCP: header checksum is incorrect\n"); return 1; } -- cgit v1.2.2