aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c18
1 files changed, 10 insertions, 8 deletions
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,
376 * probing, since DCCP-Sync probes do not risk application 376 * probing, since DCCP-Sync probes do not risk application
377 * data loss. 377 * data loss.
378 */ 378 */
379 dccp_send_sync(sk, dp->dccps_gsr); 379 dccp_send_sync(sk, dp->dccps_gsr, DCCP_PKT_SYNC);
380 } /* else let the usual retransmit timer handle it */ 380 } /* else let the usual retransmit timer handle it */
381} 381}
382 382
@@ -1008,7 +1008,7 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
1008 return 1; 1008 return 1;
1009 1009
1010 if (!pskb_may_pull(skb, sizeof(struct dccp_hdr))) { 1010 if (!pskb_may_pull(skb, sizeof(struct dccp_hdr))) {
1011 dccp_pr_debug("pskb_may_pull failed\n"); 1011 printk(KERN_WARNING "DCCP: pskb_may_pull failed\n");
1012 return 1; 1012 return 1;
1013 } 1013 }
1014 1014
@@ -1016,7 +1016,7 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
1016 1016
1017 /* If the packet type is not understood, drop packet and return */ 1017 /* If the packet type is not understood, drop packet and return */
1018 if (dh->dccph_type >= DCCP_PKT_INVALID) { 1018 if (dh->dccph_type >= DCCP_PKT_INVALID) {
1019 dccp_pr_debug("invalid packet type\n"); 1019 printk(KERN_WARNING "DCCP: invalid packet type\n");
1020 return 1; 1020 return 1;
1021 } 1021 }
1022 1022
@@ -1025,12 +1025,13 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
1025 * packet, drop packet and return 1025 * packet, drop packet and return
1026 */ 1026 */
1027 if (dh->dccph_doff < dccp_hdr_len(skb) / sizeof(u32)) { 1027 if (dh->dccph_doff < dccp_hdr_len(skb) / sizeof(u32)) {
1028 dccp_pr_debug("Offset(%u) too small 1\n", dh->dccph_doff); 1028 printk(KERN_WARNING "DCCP: Offset(%u) too small 1\n",
1029 dh->dccph_doff);
1029 return 1; 1030 return 1;
1030 } 1031 }
1031 1032
1032 if (!pskb_may_pull(skb, dh->dccph_doff * sizeof(u32))) { 1033 if (!pskb_may_pull(skb, dh->dccph_doff * sizeof(u32))) {
1033 dccp_pr_debug("P.Data Offset(%u) too small 2\n", 1034 printk(KERN_WARNING "DCCP: P.Data Offset(%u) too small 2\n",
1034 dh->dccph_doff); 1035 dh->dccph_doff);
1035 return 1; 1036 return 1;
1036 } 1037 }
@@ -1045,15 +1046,16 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
1045 dh->dccph_type != DCCP_PKT_DATA && 1046 dh->dccph_type != DCCP_PKT_DATA &&
1046 dh->dccph_type != DCCP_PKT_ACK && 1047 dh->dccph_type != DCCP_PKT_ACK &&
1047 dh->dccph_type != DCCP_PKT_DATAACK) { 1048 dh->dccph_type != DCCP_PKT_DATAACK) {
1048 dccp_pr_debug("P.type (%s) not Data, Ack nor DataAck and " 1049 printk(KERN_WARNING "DCCP: P.type (%s) not Data, Ack nor "
1049 "P.X == 0\n", dccp_packet_name(dh->dccph_type)); 1050 "DataAck and P.X == 0\n",
1051 dccp_packet_name(dh->dccph_type));
1050 return 1; 1052 return 1;
1051 } 1053 }
1052 1054
1053 /* If the header checksum is incorrect, drop packet and return */ 1055 /* If the header checksum is incorrect, drop packet and return */
1054 if (dccp_v4_verify_checksum(skb, skb->nh.iph->saddr, 1056 if (dccp_v4_verify_checksum(skb, skb->nh.iph->saddr,
1055 skb->nh.iph->daddr) < 0) { 1057 skb->nh.iph->daddr) < 0) {
1056 dccp_pr_debug("header checksum is incorrect\n"); 1058 printk(KERN_WARNING "DCCP: header checksum is incorrect\n");
1057 return 1; 1059 return 1;
1058 } 1060 }
1059 1061